Re: get a list from a string

2007-06-07 Thread Josef Dalcolmo
simon kagwe wrote: > Hi, > > I have a string "distances = [[1,1,1,1],[2,2,2,2]]". I want to create a > variable called distances whose value is the list [[1,1,1,1],[2,2,2,2]]. How > can > I go about that? s = "distances = [[1,1,1,1],[2,2,2,2]]" exec(s) - Josef -- http://mail.python.org/mailm

Re: getmtime differs between Py2.5 and Py2.4

2007-05-08 Thread Josef Dalcolmo
Martin v. Löwis wrote: >> the difference (rounding to an int number of seconds) is just about one >> hour; in certain parts of the world (Europe and Africa), that could >> indeed be a timezone issue. > > With the help of Tony Meyer, we rediscovered the explanation: because > of a bug in the Micros

getmtime differs between Py2.5 and Py2.4

2007-05-07 Thread Josef Dalcolmo
I tried this on Windows only: In Python 2.4 os.path.getmtime returned the local time, in Python 2.5 it seems to return GMT: import os, time print ctime.time(os.path.getmtime(foo)) differs on Python 2.4 and Python 2.5 by the timezone. Now, the implementation of the two stat calls differs on Win

getmtime in 2.5 reports GMT instead of local time

2007-05-03 Thread Josef Dalcolmo
Hello, I have tried this only on Windows XP. in Python 2.4 os.path.getmtime() used to return an integer representing the local time. in Python 2.5 os.path.getmtime() reports a float representing the GMT of the file's modification time. Since I could not find any documentation to this behavioura

Re: Big development in the GUI realm

2005-02-11 Thread Josef Dalcolmo
You can distribute GPL'ed code in binary form, you just have to make the sources available as well. And, yes I would use this as a test: if your program needs gpl-ed code for some of it's functionality, you have to licence your program according to the GPL - unless you distribute the GPL'ed parts