On Tue, 29 Sep 2009 22:29:10 -0700, John Yeung wrote:
> On Sep 29, 1:15 pm, Carl Banks wrote:
>> Hmm, I wonder if Python should emit a warning if an else is used on a
>> for block with no break inside. I don't think the else can be invoked
>> in any other way. As a bonus it could catch some cas
On Sep 29, 5:11 pm, Scooter wrote:
> I'm attempting to reformat an apache log file that was written with a
> custom output format. I'm attempting to get it to w3c format using a
> python script. The problem I'm having is the field-to-field matching.
> In my python code I'm using split with spaces
I have had success using the hashlib library to do a hexhash of the
tuples and then put each tuple in it's own field.The hash is
successfully being used as a test for uniqueness.
Thanks
Lol Mc
--
http://mail.python.org/mailman/listinfo/python-list
On Sep 29, 1:25 pm, MRAB wrote:
> The example that makes it clearest for me is searching
> through a list for a certain item and breaking out of
> the 'for' loop if I find it. If I get to the end of the
> list and still haven't broken out then I haven't found
> the item, and that's when the else
On Sep 29, 1:15 pm, Carl Banks wrote:
> Hmm, I wonder if Python should emit a warning if an else is
> used on a for block with no break inside. I don't think the
> else can be invoked in any other way. As a bonus it could
> catch some cases where people mistakenly use it thinking it
> will execu
On Tue, 2009-09-29 at 21:15 -0700, Rich Healey wrote:
> However:
>
> def callonce(func):
> def nullmethod(): pass
> def __():
> return func()
> func = nullmethod
> return ret
> return __
>
> @callonce
> def t2():
> print "T2 called"
> t2()
>
> Gives me:
>
On Tue, Sep 29, 2009 at 9:41 PM, Chris Rebert wrote:
> On Tue, Sep 29, 2009 at 9:15 PM, Rich Healey wrote:
>> However:
>>
>> def callonce(func):
>> def nullmethod(): pass
>> def __():
>> return func()
>> func = nullmethod
Additionally, to rebind a variable in an outer nested
On Tue, Sep 29, 2009 at 9:15 PM, Rich Healey wrote:
> However:
>
> def callonce(func):
> def nullmethod(): pass
> def __():
> return func()
> func = nullmethod
When Python sees this assignment to func as it compiles the __()
method, it marks func as a local variable and will n
On Sep 30, 2:15 pm, Rich Healey wrote:
> I'm trying to write a decorator that causes a function to do nothing
> if called more than once- the reason for this is trivial and to see if
> I can (Read- I'm enjoying the challenge, please don't ruin it for me
> =] )
>
> However I'm getting strange resul
On Tue, 29 Sep 2009 19:09:16 -0700 (PDT),
chad wrote:
> I have a directory that contains the following
>
> login
> rc
> sum
> _1
> _2
> _3
> _4
>
> What's the sanest way to print out all the files in the directory that
> start with the underscore? Ie, I just want to list _1, _2, _3, _4.
I
I'm trying to write a decorator that causes a function to do nothing
if called more than once- the reason for this is trivial and to see if
I can (Read- I'm enjoying the challenge, please don't ruin it for me
=] )
However I'm getting strange results with Python 2.6.2 on win32.
With this code:
de
On Tue, 29 Sep 2009 19:48:51 -0700, Michael George Lerner wrote:
> I then use self.selection.get_value() and self.selection.set_value(),
> and those two functions are the only ways in which I care about
> self.selection. I've never really used properties, getters or setters
> before. I tried this
Aaron Hoover wrote:
> I have a wx-based GUI application that I'd like to have read "streaming"
> data from a serial port and plot that data using matplotlib and a figure
> canvas. It's a robotic application where the workflow goes something
> like this:
>
> 1) Connect to robot
> 2) Configure robot
On Sep 29, 7:52 pm, chad wrote:
> On Sep 29, 7:20 pm, Tim Chase wrote:
>
> > > What's the sanest way to print out all the files in the directory that
> > > start with the underscore? Ie, I just want to list _1, _2, _3, _4.
>
> > I'd use a string's join() method to combine the results of a
> > lis
On Sep 29, 7:20 pm, Tim Chase wrote:
> > What's the sanest way to print out all the files in the directory that
> > start with the underscore? Ie, I just want to list _1, _2, _3, _4.
>
> I'd use a string's join() method to combine the results of a
> list-comprehension or generator that filtered th
Hi,
As part of my GUI, I have lots of fields that people can fill in,
defined like this:
self.selection = Pmw.EntryField(group.interior(),
labelpos='w',
label_text='Selection to use:
',
What's the sanest way to print out all the files in the directory that
start with the underscore? Ie, I just want to list _1, _2, _3, _4.
I'd use a string's join() method to combine the results of a
list-comprehension or generator that filtered the output of
os.listdir() based on the startswit
On 2009-09-29, Hendrik van Rooyen wrote:
> On Monday, 28 September 2009 16:44:48 Grant Edwards wrote:
>
>> $10 is pretty expensive for a lot of applications. I bet that
>> processor also uses a lot of power and takes up a lot of board
>> space. If you've only got $2-$3 in the money budget, 200uA
I have a directory that contains the following
login
rc
sum
_1
_2
_3
_4
What's the sanest way to print out all the files in the directory that
start with the underscore? Ie, I just want to list _1, _2, _3, _4.
--
http://mail.python.org/mailman/listinfo/python-list
On Monday, 28 September 2009 16:44:48 Grant Edwards wrote:
> $10 is pretty expensive for a lot of applications. I bet that
> processor also uses a lot of power and takes up a lot of board
> space. If you've only got $2-$3 in the money budget, 200uA at
> 1.8V in the power budget, and 6mm X 6mm of
On Sep 30, 1:30 am, Mikie wrote:
> Could soneone show me a simple example of a twisted server that loads
> 2 html pages
>
> www..com:7899/page1/
> www..com:7899/page2/
>
> Thanx
Hey Mikie,
Jp Calderone has been writing a very handy 'Twisted Web in 60 seconds'
series, I think part 3 on st
Would the csv module be appropriate?
On 9/29/09, Scooter wrote:
> I'm attempting to reformat an apache log file that was written with a
> custom output format. I'm attempting to get it to w3c format using a
> python script. The problem I'm having is the field-to-field matching.
> In my python cod
Mars creature wrote:
> Assume that I have 10 parameters need to pass to the function. If
> these parameters are fixed, I can use another module to store these 10
> parameters, and import to the module, as suggested by jean-michel. But
> what if these 10 parameters will be changed in the main progr
On 29 Sep, 23:56, Aaron Hoover wrote:
> how can I allow the thread
> access to the connection for reading, but then have it give up control
> over the connection when it's done so the main GUI thread can access
> the connection again for writing?
Protect read/write access to the serial port
Mars creature wrote:
I can understand the point that global variables tends to mess up
programs.
Assume that I have 10 parameters need to pass to the function. If
these parameters are fixed, I can use another module to store these 10
parameters, and import to the module, as suggested by jean-mi
I have a wx-based GUI application that I'd like to have read
"streaming" data from a serial port and plot that data using
matplotlib and a figure canvas. It's a robotic application where the
workflow goes something like this:
1) Connect to robot
2) Configure robot settings
3) Command robot
Bruno Desthuilliers wrote:
(snip)
Joel Juvenal Rivera Rivera wrote:
Hi i was playing around with my code the i realize of this
###
_uno__a = 1
class uno():
__a = 2
def __init__(self):
print __a
uno()
###
and prints 1
I beg to disagree. The probl
Visco Shaun wrote:
Hi all
For an exception defined as below
class OptionError(Exception):
def __init__(self, args):
self.args = args
def __str__(self):
return repr(self.v)
an iteration is happening when the exception is raised
What is self.v intended to produce?
I created a new class for each instance as you suggested and added the
descriptor to the class. It worked great. Thanks for the help.
Brian Huggins
--
http://mail.python.org/mailman/listinfo/python-list
Hello.
I have a problem can not run.
I'm not understand.
Help me please.
How to use and detail ?
Thanks.
#!/usr/bin/python2.5
import py_net_libs
class dissect:
def __init__(self,pkt,offset):
self.pkt, self.offset = py_net_libs.arp_dissect(pkt,offset)
self.next
Scott David Daniels a écrit :
> Different than "Shell / Restart Shell (Ctrl+F6)" ?
> Of course this doesn't work if you started Idle ith the "-n" switch.
>
Thanks for the info : by default on my Ubuntu distrib, IDLE is launched
with the -n option ;) Now, all is clear !
--
http://mail.python.
Mars creature wrote:
I just start to use python and love this language. I met this
problem when I try to save my functions in a separate file.
The question is how I can pass a global variable to a function which
is saved in another file.
This question is somewhat mis-phrased. In Python, one u
On Sep 29, 10:38 am, Duncan Booth
wrote:
> Carl Banks wrote:
> > Hmm, I wonder if Python should emit a warning if an else is used on a
> > for block with no break inside. I don't think the else can be invoked
> > in any other way. As a bonus it could catch some cases where people
> > mistakenly
On Sep 29, 1:19 pm, Jamie wrote:
> On Sep 29, 1:08 pm, Jamie wrote:
>
>
>
>
>
> > I'm new to python and I'm trying to write a script which takes the
> > computer name from the variable 'name' and gets the uptime.
>
> > What I have so far:
> > query = win32pdh.OpenQuery()
> > counter = win
On Sep 29, 9:43 am, Andre Engels wrote:
> On Tue, Sep 29, 2009 at 3:35 PM, kks wrote:
> > if myFile variable contains the actual filename then how can i open a
> > file for wirte so that complete filename appears as
> > "actualname_kks.txt"
>
> open(myFile + "_kks.txt", "w")
>
> --
> André Engels
Mars creature wrote:
On Sep 29, 12:49 pm, "Rami Chowdhury"
wrote:
On Tue, 29 Sep 2009 09:40:29 -0700, Mars creature wrote:
Dear Python users,
I just start to use python and love this language. I met this
problem when I try to save my functions in a separate file.
The question is how I can p
On Tue, Sep 29, 2009 at 11:11 AM, Scooter wrote:
> I'm attempting to reformat an apache log file that was written with a
> custom output format. I'm attempting to get it to w3c format using a
> python script. The problem I'm having is the field-to-field matching.
> In my python code I'm using spli
On Sep 29, 12:49 pm, "Rami Chowdhury"
wrote:
> On Tue, 29 Sep 2009 09:40:29 -0700, Mars creature wrote:
> > Dear Python users,
> > I just start to use python and love this language. I met this
> > problem when I try to save my functions in a separate file.
> > The question is how I can pass a g
On 29 Sep, 19:11, Carl Banks wrote:
> CObjects can be passed a C function as a deallocator; this should work
> as reliably as a custom class deallocator.
>
> Carl Banks
Except that __del__ prevents cyclic GC.
--
http://mail.python.org/mailman/listinfo/python-list
On Sep 29, 1:08 pm, Jamie wrote:
> I'm new to python and I'm trying to write a script which takes the
> computer name from the variable 'name' and gets the uptime.
>
> What I have so far:
> query = win32pdh.OpenQuery()
> counter = win32pdh.AddCounter(query, r'\System\System Up Time')
>
I'm new to python and I'm trying to write a script which takes the
computer name from the variable 'name' and gets the uptime.
What I have so far:
query = win32pdh.OpenQuery()
counter = win32pdh.AddCounter(query, r'\System\System Up Time')
win32pdh.CollectQueryData(query)
var1, val
On Tue, 29 Sep 2009 09:40:29 -0700, Mars creature wrote:
Dear Python users,
I just start to use python and love this language. I met this
problem when I try to save my functions in a separate file.
The question is how I can pass a global variable to a function which
is saved in another file.
Carl Banks wrote:
> Hmm, I wonder if Python should emit a warning if an else is used on a
> for block with no break inside. I don't think the else can be invoked
> in any other way. As a bonus it could catch some cases where people
> mistakenly use it thinking it will execute when there are no
Mars creature wrote:
Dear Python users,
I just start to use python and love this language. I met this
problem when I try to save my functions in a separate file.
The question is how I can pass a global variable to a function which
is saved in another file. If I save the function I defined in th
Ethan Furman wrote:
Sandy wrote:
Hi all,
A simple and silly if-else question.
I saw some code that has the following structure. My question is why
else is used there though removing else
has the same result. More important, is it not syntactically wrong :-(
for i in xrange(8):
if i < 4:
On Sep 20, 8:19 am, Peng Yu wrote:
>
> I am wondering what is the best way of organizing python source code
> in a large projects. There are package code, testing code. I'm
> wondering if there has been any summary on previous practices.
>
(Sorry for the late reply.)
My advice: Don't write big p
On Sep 29, 9:08 am, Gary Herron wrote:
> Sandy wrote:
> > Hi all,
> > A simple and silly if-else question.
> > I saw some code that has the following structure. My question is why
> > else is used there though removing else
> > has the same result. More important, is it not syntactically wrong :-(
a month or two back where folks were asking to turn os.listdir()
into an iterator (or create an os.xlistdir() or os.iterdir()
function) because directories with lots of files were causing
inordinate slowdown. Yes, listdir() in both 2.x and 3.x both
return lists while such a proposed iterator vers
On Sep 29, 9:42 am, sturlamolden wrote:
> You can use PyCObject, or write your own extension type that wraps the
> pointer (very easy to to with Cython or Pyrex). The advantage of using
> an extension type is you have a guarantee from Python on the
> deallocator method being called (cdef __dealloc
Hi,
Am Tue, 29 Sep 2009 09:40:29 -0700 (PDT)
schrieb Mars creature :
> I just start to use python and love this language. I met this
> problem when I try to save my functions in a separate file.
> The question is how I can pass a global variable to a function which
> is saved in another file. I
If I'm reading the indentation correctly, the else is applying to the for
loop, not the if statement.
When used in this way, the else occurs only if the for loop exits due to
completion (aka, the for loop does not exit due to a break or return
statement).
I would expect the output from that code
On 29 Sep, 10:27, "lallous" wrote:
> Hello
>
> From my C extension module I want to store a C pointer in a given PyObject.
>
> The only way I figure how to do it is to use Py_BuildValues and store the
> poiner casted to Py_ssize_t,
Formally, you should cast the pointer to Py_intptr_t, as it has t
Dear Python users,
I just start to use python and love this language. I met this
problem when I try to save my functions in a separate file.
The question is how I can pass a global variable to a function which
is saved in another file. If I save the function I defined in the same
file with the ma
On Sep 29, 10:24 am, "tedpot...@gmail.com"
wrote:
> Hi,
> I'm trying to post data to a short test script in php I wrote.
> The python code to do the post is
> import httplib
>
> #server address
> conn = httplib.HTTPConnection("localhost")
>
> #file location
> conn.request("POST", "/programming/bot
Hi,
I'm trying to post data to a short test script in php I wrote.
The python code to do the post is
import httplib
#server address
conn = httplib.HTTPConnection("localhost")
#file location
conn.request("POST", "/programming/bots/test.php","&ted=fred")
r1 = conn.getresponse()
print r1.status, r1.
On Sep 29, 2:27 am, "lallous" wrote:
> Hello
>
> From my C extension module I want to store a C pointer in a given PyObject.
>
> The only way I figure how to do it is to use Py_BuildValues and store the
> poiner casted to Py_ssize_t, thus:
>
> Py_BuildValues("n", (Py_ssize_t)my_ptr)
>
> Can it be
Sandy wrote:
Hi all,
A simple and silly if-else question.
I saw some code that has the following structure. My question is why
else is used there though removing else
has the same result. More important, is it not syntactically wrong :-(
for i in xrange(8):
if i < 4:
print i
else:
Sandy wrote:
Hi all,
A simple and silly if-else question.
I saw some code that has the following structure. My question is why
else is used there though removing else
has the same result. More important, is it not syntactically wrong :-(
for i in xrange(8):
if i < 4:
print i
else:
Sandy wrote:
Hi all,
A simple and silly if-else question.
I saw some code that has the following structure. My question is why
else is used there though removing else
has the same result. More important, is it not syntactically wrong :-(
for i in xrange(8):
if i < 4:
print i
else:
Björn Lindqvist wrote:
2009/9/29 Scooter :
I'm attempting to reformat an apache log file that was written with a
custom output format. I'm attempting to get it to w3c format using a
python script. The problem I'm having is the field-to-field matching.
In my python code I'm using split with space
Hi all,
A simple and silly if-else question.
I saw some code that has the following structure. My question is why
else is used there though removing else
has the same result. More important, is it not syntactically wrong :-(
for i in xrange(8):
if i < 4:
print i
else:
print i
Chee
Could soneone show me a simple example of a twisted server that loads
2 html pages
www..com:7899/page1/
www..com:7899/page2/
Thanx
--
http://mail.python.org/mailman/listinfo/python-list
Hello
Suppose I have this code:
class X:
def __init__(self, n):
self.L = [x for x in xrange(0, n+1)]
class Y:
def __init__(self, n):
self.M = [X(x) for x in xrange(0, n)]
t = Y(5)
How can I easily print "t" and all its nested attributes? (Something like
PHP's print_r())
Thanks Carl, that does it!
--
Elias
"Carl Banks" wrote in message
news:48ce343a-36ef-406f-bea3-851444785...@b18g2000vbl.googlegroups.com...
On Sep 28, 8:19 am, "lallous" wrote:
Hello
How to programmatically create a class instance of a given Python class?
For example to create a new list
2009/9/29 Scooter :
> I'm attempting to reformat an apache log file that was written with a
> custom output format. I'm attempting to get it to w3c format using a
> python script. The problem I'm having is the field-to-field matching.
> In my python code I'm using split with spaces as my delimiter.
Carl Banks a écrit :
On Sep 29, 3:11 am, Bruno Desthuilliers wrote:
Mark Dickinson a écrit :
(snip)
The double underscores and name mangling are a red herring:
I beg to disagree. The problem (well... what I think is a problem,
actually) IS that name mangling is applied to a method *local* va
I'm attempting to reformat an apache log file that was written with a
custom output format. I'm attempting to get it to w3c format using a
python script. The problem I'm having is the field-to-field matching.
In my python code I'm using split with spaces as my delimiter. But it
fails when it reache
candide wrote:
Hi
I was wondering if there exists somme way to clear memory of all objects
created during a current IDLE session (with the same effect as if one
starts an IDLE session). Thanks.
Different than "Shell / Restart Shell (Ctrl+F6)" ?
Of course this doesn't work if you started Idle i
On Sep 29, 3:11 am, Bruno Desthuilliers wrote:
> Mark Dickinson a écrit :
>
>
>
> > On Sep 28, 9:37 am, Bruno Desthuilliers > 42.desthuilli...@websiteburo.invalid> wrote:
> >> Joel Juvenal Rivera Rivera a écrit :
>
> >>> Yeah i forgot the self an try the code then i see
> >>> an error that it was
On Tuesday, 29 September 2009 11:03:17 Tim Chase wrote:
> I think Steven may be remembering the conversation here on c.l.p
> a month or two back where folks were asking to turn os.listdir()
> into an iterator (or create an os.xlistdir() or os.iterdir()
> function) because directories with lots of
On Sep 28, 7:37 pm, Scott wrote:
> On Sep 28, 2:00 pm, Dave Angel wrote:
>
>
>
> > Scott wrote:
> > > Thank you fine folks for getting back with your answers!
>
> > > So down the road I do dictname[line42].append("new stuff"). (or [var]
> > > if I'm looping through the dict)
>
> > Nope, you still
Grant Edwards wrote:
I recently ran across this construct for grabbing the last
(whitespace delimited) word in a string:
s.rsplit(None,1)[1]
... I've always done this:
s.split()[-1]
I was wondering what the advantage of the rsplit(None,1)[1]
approach would be ...
Others have pointed out th
Hendrik van Rooyen wrote:
> On Monday, 28 September 2009 18:54:09 Scott wrote:
>> I am new to Python but I have studied hard and written a fairly big
>> (to me) script/program. I have solved all of my problems by Googling
>> but this one has got me stumped.
>>
>> I want to check a string for a sub
On Monday, 28 September 2009 18:54:09 Scott wrote:
> I am new to Python but I have studied hard and written a fairly big
> (to me) script/program. I have solved all of my problems by Googling
> but this one has got me stumped.
>
> I want to check a string for a substring and if it exists I want to
On Tue, Sep 29, 2009 at 3:35 PM, kks wrote:
> if myFile variable contains the actual filename then how can i open a
> file for wirte so that complete filename appears as
> "actualname_kks.txt"
open(myFile + "_kks.txt", "w")
--
André Engels, andreeng...@gmail.com
--
http://mail.python.org/mailm
if myFile variable contains the actual filename then how can i open a
file for wirte so that complete filename appears as
"actualname_kks.txt"
--
http://mail.python.org/mailman/listinfo/python-list
Hi
I was wondering if there exists somme way to clear memory of all objects
created during a current IDLE session (with the same effect as if one
starts an IDLE session). Thanks.
--
http://mail.python.org/mailman/listinfo/python-list
On Sep 29, 11:11 am, Bruno Desthuilliers wrote:
> Mark Dickinson a écrit :
> > On Sep 28, 9:37 am, Bruno Desthuilliers > 42.desthuilli...@websiteburo.invalid> wrote:
> >> Looks like a bug to me. I Think you should fill a ticket...
>
> > I don't think it's a bug. Unless I'm missing something,
> >
Mark Dickinson a écrit :
On Sep 28, 9:37 am, Bruno Desthuilliers wrote:
Joel Juvenal Rivera Rivera a écrit :
Yeah i forgot the self an try the code then i see
an error that it was not defines _uno__a so that's
where i define the global and see that behavior.
(snip)
Joel Juvenal Rivera Riv
Visco Shaun wrote:
> Hi all
>
> For an exception defined as below
>
> class OptionError(Exception):
> def __init__(self, args):
> self.args = args
This should read:
def __init__(self, *args):
self.args = args
(notice the * !)
self.args holds the constructor argument tu
Hi all
For an exception defined as below
class OptionError(Exception):
def __init__(self, args):
self.args = args
def __str__(self):
return repr(self.v)
an iteration is happening when the exception is raised
Meanwhile for almost the same structured exception replacing th
Rudolf wrote:
How can i declare a global array in python?
import __builtin__
__builtin__.myList = []
Now you can use myList everywhere in your code.
Note that modifying __builtin__ is **not** recommended at all. I don't
have time to detail that point, google it if you want the answer. I
w
Piet van Oostrum wrote:
Steven D'Aprano (SD) wrote:
SD> What you describe is impossible -- os.listdir() returns an ordinary list,
SD> it isn't a lazy iterator that updates automatically as the directory
SD> changes. (At least not in Python2.5 -- I haven't checked Python 3.1.)
He's not usi
Threader Slash wrote:
Hello Everybody,
My doubt is about matrix data manipulation in python - I hope someone
can point me some direction.
I googled around, but there is not much good examples about playing with
matrix in python on internet.
My following function works pretty well, and give
On 28 Sep, 17:49, Dennis Lee Bieber wrote:
> On Mon, 28 Sep 2009 03:35:44 -0700 (PDT), xera121
> declaimed the following in
> gmane.comp.python.general:
>
> > Hi
> > I have tuples in the format shown below:
>
> > (u('2','3','4'),u('5','6','7')u('20','21','22'))
>
> What are they?
Hello
From my C extension module I want to store a C pointer in a given PyObject.
The only way I figure how to do it is to use Py_BuildValues and store the
poiner casted to Py_ssize_t, thus:
Py_BuildValues("n", (Py_ssize_t)my_ptr)
Can it be done differently?
Regards,
Elias
--
http://ma
On Sep 28, 9:41 pm, Daniel Fetchinson
wrote:
> > I'm new to using SQLObject, and having some problems with getting it
> > to recognise my current MySQL database.
>
> > I've set up my connection fine, but it won't recognise the names of
> > the columns (presumably because they're not written using
> Steven D'Aprano (SD) wrote:
>SD> What you describe is impossible -- os.listdir() returns an ordinary list,
>SD> it isn't a lazy iterator that updates automatically as the directory
>SD> changes. (At least not in Python2.5 -- I haven't checked Python 3.1.)
He's not using Python3, see the
Hello Everybody,
My doubt is about matrix data manipulation in python - I hope someone can
point me some direction.
I googled around, but there is not much good examples about playing with
matrix in python on internet.
My following function works pretty well, and gives me the outup from my
MySQL
On Sep 29, 5:48 am, Rudolf wrote:
> How can i declare a global array in python?
As others have mentioned, you do not have concept of declaration. But
if you are looking for creating a global variable, it is like any
other language. Declare the same in a module, outside any procedures
or classes.
On this post, you are talking about Talend and Informatica like both
are
comparable... indeed both tools are comparable in power and
functionality.
But keep in mind Informatica is a proprietary solution, with no access
to the code. You have a license fee + other costs associated to the
use
of Infa.
On 2009-09-28, Hendrik van Rooyen wrote:
> On Saturday, 26 September 2009 16:55:30 Grant Edwards wrote:
>> On 2009-09-26, Dave Angel wrote:
>> > Actually even 64k looked pretty good, compared to the 1.5k of
>> > RAM and 2k of PROM for one of my projects, a navigation system
>> > for shipboard use
If you can enumerate the language of possible inputs you could
generate a unique binary representation. Against a language of size
l that would only take you O(l*n) to build the repr for a dict
and for certain repr sizes the comparison could be O(1), making
the entire operation O(l*n+l*m) vs O(n
On Tue, 29 Sep 2009 16:03:46 +1000, Chris Adamson wrote:
> Hello,
>
> I am writing code that cycles through files in a directory and for each
> file it writes out another file with info in it. It appears that as I am
> iterating through the list returned by os.listdir it is being updated
> with t
Chris Adamson wrote:
> I am writing code that cycles through files in a directory and for each
> file it writes out another file with info in it. It appears that as I am
> iterating through the list returned by os.listdir it is being updated
> with the new files that are being added to the directo
On Tue, 29 Sep 2009 18:21:09 +1200, greg wrote:
> Peng Yu wrote:
>
>>>What python/OS are you using?
>>
>> python 2.6.2 and CentOS
>
> Just tried 2.6 on Darwin, and it does happen. So looks like 2.6 has been
> changed to inherit the permission bits from the .py. Makes sense, except
> that the x
96 matches
Mail list logo