Re: I'm a python addict !

2009-01-28 Thread afriere
On Jan 27, 4:52 am, Paul McGuire wrote: [snip] > >     # how you have to do it in C++ and Java >     # light = light.next_state() > >     # using Python >     light.__class__ = light.next_state I'm sure you can, but why poke yourself in the eye with a blunt stick? ;) IMO there are two obvious pr

Re: Results of executing hyperlink in script

2009-01-28 Thread Tino Wildenhain
Tim Chase wrote: 1. This method was suggested by Cameron Laird: os.system("start %s" % URL) It works. But, if the URL contains character &, it will fail. For As an aside, the START command is a bit picky regarding quotes. You have to use this horrible contortion os.system('start "

Re: Profiling Python Apps on Mac?

2009-01-28 Thread Robert Kern
On 2009-01-28 13:14, RGK wrote: I'm writing a python app on a Mac (in Eclipse + PyDev w/ Python2.5 & wxPython under OSX 10.4) As I make program architecture decisions, it would be nice to be able to profile the choices. Should I add that extra thread? Is this big-assed xml object I just created

Re: Recommendation for a small web framework like Perl's CGI::Application to run as CGI?

2009-01-28 Thread Jeroen Ruigrok van der Werven
-On [20090128 20:36], excord80 (excor...@gmail.com) wrote: >If that's correct, it would be great if there were a Werkzeug tutorial >on deploying it for use with CGI. There are some real life frontends for CGI, FCGI and WSGI in Zine[1]. Look in the servers directory in the repository.

Re: dicts,instances,containers, slotted instances, et cetera.

2009-01-28 Thread Michele Simionato
On Jan 29, 12:23 am, ocsch...@gmail.com wrote: > I just find it odd that there's no quick answer on the > fastest way in Python to implement a mapping in this context. A Python dict is as fast as you can get. If that is not enough, your only choice is to try something at the C level, which may gi

Re: self-aware list of objects able to sense constituent member alterations?

2009-01-28 Thread Peter Wang
On Jan 27, 3:16 pm, Reckoner wrote: > I'm not sure this is possible, but I would like to have > a list of  objects > > A=[a,b,c,d,...,z] > > where,  in the midst of a lot of processing I might do something like, > > A[0].do_something_which_changes_the_properties() > > which alter the properties of

Re: Profiling Python Apps on Mac?

2009-01-28 Thread David Cournapeau
On Thu, Jan 29, 2009 at 4:14 AM, RGK wrote: > I'm writing a python app on a Mac (in Eclipse + PyDev w/ Python2.5 & > wxPython under OSX 10.4) > > As I make program architecture decisions, it would be nice to be able to > profile the choices. Should I add that extra thread? Is this big-assed xml

Re: Profiling Python Apps on Mac?

2009-01-28 Thread Pierre-Alain Dorange
RGK wrote: > As I make program architecture decisions, it would be nice to be able to > profile the choices. Should I add that extra thread? Is this big-assed > xml object I just created horribly bloated or kind of ordinary. python -m profile yourscript.py see

Re: self-aware list of objects able to sense constituent member alterations?

2009-01-28 Thread Steven D'Aprano
On Wed, 28 Jan 2009 11:06:21 -0800, Reckoner wrote: > thanks for your reply. > > For the second case where > >> class TaintThing(object): >> parent = A >> def __init__(self, obj): >> self.__dict__['_proxy'] = obj >> def __getattr__(self, attr): >> return getattr(self.

Re: Tkinter w.pack()?

2009-01-28 Thread John Posner
The difference between the fill=, expand=, and anchor= options to the pack() function takes a while to get used to. In brief: * fill= controls the size of a control itself * expand= controls the size of the space into which the pack() function places a control * anchor= comes into play if the si

Re: Tkinter w.pack()?

2009-01-28 Thread r
On Jan 28, 10:57 pm, "W. eWatson" wrote: > The word pack doesn't exist on the NMT pdf. Maybe there's a newer one? Only the grid manager is discussed at NMT. I just like how at NMT the widget attributes are in a table and then a list the widget methods follows below that -- much better navigation.

Re: Tkinter w.pack()?

2009-01-28 Thread Gabriel Genellina
En Thu, 29 Jan 2009 02:57:04 -0200, W. eWatson escribió: The word pack doesn't exist on the NMT pdf. Maybe there's a newer one? There is a PDF version of "An Introduction to Tkinter" here: http://www.pythonware.com/library/ -- Gabriel Genellina -- http://mail.python.org/mailman/listinfo/p

Re: Tkinter w.pack()?

2009-01-28 Thread W. eWatson
r wrote: To expand on this there exists three geometry mangers [grid, pack, place]. I personally use pack() the most, grid() almost never, and place -- well never. But each one has it's strengths and weaknesses. w.grid() http://effbot.org/tkinterbook/grid.htm w.place() http://effbot.org/tkinter

Re: Tkinter w.pack()?

2009-01-28 Thread W. eWatson
r wrote: On Jan 28, 10:12 pm, "W. eWatson" wrote: Where in the world is a description of pack() for Tkinter widgets? Is it some sort of general method for all widgets? I'm looking in a few docs that use it without ever saying where it is described. For one,

Re: dicts,instances,containers, slotted instances, et cetera.

2009-01-28 Thread Steven D'Aprano
On Wed, 28 Jan 2009 15:20:41 -0800, ocschwar wrote: > On Jan 28, 4:50 pm, Aaron Brady wrote: >> On Jan 28, 2:38 pm, ocsch...@gmail.com wrote: >> >> Hello, quoting myself from another thread today: >> >> There is the 'shelve' module.  You could create a shelf that tells you >> the filename of the

Re: Tkinter w.pack()?

2009-01-28 Thread r
To expand on this there exists three geometry mangers [grid, pack, place]. I personally use pack() the most, grid() almost never, and place -- well never. But each one has it's strengths and weaknesses. w.grid() http://effbot.org/tkinterbook/grid.htm w.place() http://effbot.org/tkinterbook/place.

Re: Tkinter w.pack()?

2009-01-28 Thread r
On Jan 28, 10:12 pm, "W. eWatson" wrote: > Where in the world is a description of pack() for Tkinter widgets? Is it > some sort of general method for all widgets? I'm looking in a few docs that > use it without ever saying where it is described. For one, >

Tkinter w.pack()?

2009-01-28 Thread W. eWatson
Where in the world is a description of pack() for Tkinter widgets? Is it some sort of general method for all widgets? I'm looking in a few docs that use it without ever saying where it is described. For one, . In the NM Tech pdf on Tkinter, it's not foun

Re: Exec woes

2009-01-28 Thread Rhodri James
On Wed, 28 Jan 2009 07:47:00 -, Hendrik van Rooyen wrote: Stephen Hansen wrote: Exec is a statement, not a function nor an object: even though you can enclose parens around its arguments like you do later on, they don't have any syntax meaning This is actually not correct - it is th

Re: need help

2009-01-28 Thread juvy j
Hi tkc, Thanks so much.. it works! :-) I used the urllib. and thanks also to everybody who replied. jtj On Thu, Jan 29, 2009 at 11:08 AM, Tim Chase wrote: > Thanks for you reply. I am newbie in python. >> Im going to use HTTP. >> > > If all you want is to download a file, you might want to l

Re: Function Application is not Currying

2009-01-28 Thread Tim Greer
Russ P. wrote: > On Jan 28, 1:32 pm, Xah Lee wrote: >> Function Application is not Currying >> >> Xah Lee, 2009-01-28 >> >> In Jon Harrop's book Ocaml for Scientist >> athttp://www.../chapter1.html >> >> It says: >> >> Currying >> >> A curried function is a function which returns a function

Re: Function Application is not Currying

2009-01-28 Thread Russ P.
On Jan 28, 1:32 pm, Xah Lee wrote: > Function Application is not Currying > > Xah Lee, 2009-01-28 > > In Jon Harrop's book Ocaml for Scientist > athttp://www.ffconsultancy.com/products/ocaml_for_scientists/chapter1.html > > It says: > >     Currying > >     A curried function is a function w

Re: Results of executing hyperlink in script

2009-01-28 Thread Tim Chase
1. This method was suggested by Cameron Laird: os.system("start %s" % URL) It works. But, if the URL contains character &, it will fail. For As an aside, the START command is a bit picky regarding quotes. You have to use this horrible contortion os.system('start "title" "%s"' % URL

Re: pyAA for Python2.5

2009-01-28 Thread Kottiyath
On Jan 29, 1:51 am, Rob Williscroft wrote: > Kottiyath wrote in news:6a594643-f6a2-4d8d-aab3-27eb16cb2fb8 > @b38g2000prf.googlegroups.com in comp.lang.python: > > > > > I have mingw32-gcc in my path. If I try that too -it fails. > > > C:\Documents and Settings\Guest\pyAA>python setup.py install -c

Re: need help

2009-01-28 Thread Tim Chase
Thanks for you reply. I am newbie in python. Im going to use HTTP. If all you want is to download a file, you might want to look into using "wget" or "curl" (which work for both HTTP and FTP). E.g. bash$ wget http://myothermachine/path/to/file.html However, if you need to roll it into a s

Re: Results of executing hyperlink in script

2009-01-28 Thread Gabriel Genellina
En Wed, 28 Jan 2009 20:49:14 -0200, Muddy Coder escribió: My previous post got a many helps from the people, and I tested what they suggested. Since this topic maybe needed in future, so I drop these lines below to help the future programmers. The methods worked as below: 1. This method was

How to get atexit hooks to run in the presence of execv?

2009-01-28 Thread R. Bernstein
As a hobby I've been (re)writing a debugger. One of the commands, "restart", works by calling an execv(). You may need to do this when the program you are debugging is threaded or when one needs to ensure that all program state is reinitialized. Recently, I added remote debugging via TCP sockets.

Re: Sloooooowwwww WSGI restart

2009-01-28 Thread Ron Garret
In article <4cd232ff-ba8b-47aa-8ee6-d8d9712db...@s1g2000prg.googlegroups.com>, Graham Dumpleton wrote: > On Jan 29, 8:35 am, Ron Garret wrote: > > I'm running a WSGI app under apache/mod_wsgiand I've noticed that > > whenever I restart the server after making a code change it takes a very > >

Re: date handling problem

2009-01-28 Thread Gabriel Genellina
En Wed, 28 Jan 2009 18:55:21 -0200, S.Selvam Siva escribió: I need to parse rss-feeds based on time stamp,But rss-feeds follow different standards of date(IST,EST etc). I dont know,how to standardize this standards.It will be helpful if you can hint me. You may find the Olson timezone

Re: Quickbooks

2009-01-28 Thread Gabriel Genellina
En Wed, 28 Jan 2009 16:21:29 -0200, Stephen Chapman escribió: Has anyone Implemented the Quickbooks COM object in Python. If so can you give me an Idea of where to begin. You'll want the pywin32 package by Mark Hammond -available from sourceforge-. It provides the infrastructure requi

Re: Drawing and Displaying an Image with PIL

2009-01-28 Thread W. eWatson
Peter Otten wrote: W. eWatson wrote: r wrote: Change this line: draw.line((0,0),(20,140), fill=128) To This: draw.line((0,0, 20,140), fill=128) And you should be good to go. Like you said, if you need to combine 2 tuples you can do: (1,2)+(3,4) Yes, that's true, but the big question is how

Re: writing large dictionaries to file using cPickle

2009-01-28 Thread Gabriel Genellina
En Wed, 28 Jan 2009 14:13:10 -0200, escribió: i have a large dictionary which contains about 10 keys, each key has a value which is a list containing about 1 to 5 million (small) dictionaries. for example, mydict = {key1: [{'a': 1, 'b': 2, 'c': 'hello'}, {'d', 3, 'e': 4, 'f': 'world'}, ...],

Re: Results of executing hyperlink in script

2009-01-28 Thread Cameron Laird
In article , MRAB wrote: >Muddy Coder wrote: . . . >You could put quotes around the URL: > >os.startfile('"%s"' % URL) > >or: > >os.system('start "%s"' % URL) > >if "&" has a special meaning to the command-line. In fact, no,

Re: Function Application is not Currying

2009-01-28 Thread Kaz Kylheku
On 2009-01-28, Xah Lee wrote: > Function Application is not Currying That's correct, Xah. Currying is a special case of function application. A currying function is applied to some other function, and returns function that has fewer arguments. In some languages, you don't see the currying funct

Re: need help

2009-01-28 Thread juvy j
Hi Steve, Thanks for you reply. I am newbie in python. Im going to use HTTP. thanks a lot On Wed, Jan 28, 2009 at 9:40 PM, Steve Holden wrote: > juvy j wrote: > > Hi guys, > > > > need help on how to read file from other server(linux). > > > Which service do you plan to use: FTP, HTTP and NFS

Re: Sloooooowwwww WSGI restart

2009-01-28 Thread Graham Dumpleton
On Jan 29, 8:44 am, Aleksandar Radulovic wrote: > Hi there, > > On Wed, Jan 28, 2009 at 9:35 PM, Ron Garret wrote: > > I'm running a WSGI app under apache/mod_wsgiand I've noticed that > > Off the bat, there's no reason to run an app under apache/mod_wsgi > while developing it, > ie. if u use Pyl

Re: Sloooooowwwww WSGI restart

2009-01-28 Thread Ron Garret
In article , Jean-Paul Calderone wrote: > On Wed, 28 Jan 2009 13:35:56 -0800, Ron Garret wrote: > >I'm running a WSGI app under apache/mod_wsgi and I've noticed that > >whenever I restart the server after making a code change it takes a very > >long time (like a minute) before the script is act

Re: Sloooooowwwww WSGI restart

2009-01-28 Thread Ron Garret
In article , Aleksandar Radulovic wrote: > Hi there, > > On Wed, Jan 28, 2009 at 9:35 PM, Ron Garret wrote: > > I'm running a WSGI app under apache/mod_wsgi and I've noticed that > > Off the bat, there's no reason to run an app under apache/mod_wsgi > while developing it, > ie. if u use Pylon

Re: Sloooooowwwww WSGI restart

2009-01-28 Thread Graham Dumpleton
On Jan 29, 8:35 am, Ron Garret wrote: > I'm running a WSGI app under apache/mod_wsgiand I've noticed that > whenever I restart the server after making a code change it takes a very > long time (like a minute) before the script is active again.  In other > words, I do an apachectl restart, reload t

program organization question

2009-01-28 Thread Vincent Davis
Basically my program simulates the Medical Residency Match, generating simulated data, running the match and then summarizing results. Currently it does this all in one document (starting conditions--Gen data--run match--summarize results). I will be running multiple simulations on different starti

Re: Reuse of DB-API 2.0 cursors for multiple queries?

2009-01-28 Thread Carsten Haese
moreati wrote: > Today, I used the adodbapi module against an SQL Server Express > database. I was surprised to get an exception, when I attempted to > submit a second query with my cursor object. The full session is > below. > > With cx_Oracle I've become used to reusing a cursor for subsequent >

Re: Windows PIL installer question

2009-01-28 Thread Gabriel Genellina
En Wed, 28 Jan 2009 15:07:54 -0200, cjl escribió: Is there any way to run the PIL installer from the command line on Windows in 'silent' mode, without displaying the install screens or requiring user interaction? Is it a .msi? msiexec /i filename.msi /quiet /log path\to\logfile.log -- Gabrie

Re: Function Application is not Currying

2009-01-28 Thread James Mills
On Thu, Jan 29, 2009 at 10:28 AM, alex23 wrote: > On Jan 29, 7:32 am, Xah Lee wrote: >> But he is really a asshole, and >> take every chance to peddle his book. > > As opposed to really being an asshole and peddling one's website at > every opportunity? It would seem that Xah Lee suffers from a

Re: Function Application is not Currying

2009-01-28 Thread alex23
On Jan 29, 7:32 am, Xah Lee wrote: > But he is really a asshole, and > take every chance to peddle his book. As opposed to really being an asshole and peddling one's website at every opportunity? -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Package Managment

2009-01-28 Thread david.lyon
Hi, >>> People coming to Python from Perl and Ruby expect to be able to just >>> run a command to download and install a package. TRUE TRUE Forgive me, but I am no python specialist. But I use all the other languages as well and python isn't up to standard in this area. Perphaps 50% of al

Re: small python-cgi wiki?

2009-01-28 Thread Дамјан Георгиевски
> I'm looking to set up a small private wiki, and am looking for > recommendations. > > Some sort of CGI based package that I could just untar somewhere web > accessable via Apache would be great. http://hatta.sheep.art.pl/About · single file · stores stuff in mercurial. · it's WSGI, so yes you c

how to update python on gnu emacs?

2009-01-28 Thread John Seales
I've updated to python 2.6. My terminal application finds the new python just fine, but my gnu-emacs still is on python 2.3. Does anyone know how I can change that? using x86 powerbook John Seales _ Windows Live™ Hotmail®…more th

Re: Reuse of DB-API 2.0 cursors for multiple queries?

2009-01-28 Thread Дамјан Георгиевски
> Today, I used the adodbapi module against an SQL Server Express > database. I was surprised to get an exception, when I attempted to > submit a second query with my cursor object. The full session is > below. >>> curs.execute('select * from localview_roles') >>> curs.execute('select * from loc

Re: errno 22 instead of errno 2

2009-01-28 Thread Gabriel Genellina
En Wed, 28 Jan 2009 07:04:30 -0200, Tim Golden escribió: Glenn Linderman wrote: open("c:\abc","rb") This simple one-line script, produces errno 22 on Python 2.6, but errno 2 on Python 2.5.2 Just glancing quickly at the svn logs, there certainly were some changes around that area in 2008

Re: writing large dictionaries to file using cPickle

2009-01-28 Thread John Machin
On Jan 29, 9:43 am, perfr...@gmail.com wrote: > On Jan 28, 5:14 pm, John Machin wrote: > > > > > On Jan 29, 3:13 am, perfr...@gmail.com wrote: > > > > hello all, > > > > i have a large dictionary which contains about 10 keys, each key has a > > > value which is a list containing about 1 to 5 milli

Re: Function Application is not Currying

2009-01-28 Thread MRAB
s...@netherlands.com wrote: On Wed, 28 Jan 2009 13:32:29 -0800 (PST), Xah Lee wrote: Function Application is not Currying Xah Lee, 2009-01-28 In Jon Harrop's book Ocaml for Scientist at http://www.ffconsultancy.com/products/ocaml_for_scientists/chapter1.html It says: Currying A curr

Re: file date/time on windows

2009-01-28 Thread MRAB
m.banaouas wrote: thanks, someone gave me the solution: simply call time.localtime(...) instead of time.gmtime(...) The explorer file time is what I need because it's the only file date visible for most of users. So localtime is perfect for me. We are talking about the same file stored in a shar

Re: Terminating a Python program that uses multi-process, multi-threading

2009-01-28 Thread akineko
On Jan 28, 1:11 pm, MRAB wrote: > A hacky way of killing the processes would be for the processes to write > their process IDs to the log and then you can write another script which > will parse the log to get the process IDs and then kill the processes > with those IDs. (Left as an exercise for t

Re: bigint to timestamp

2009-01-28 Thread John Machin
On Jan 29, 10:00 am, John Machin wrote: > On Jan 29, 1:05 am, Jon Clements wrote: > > > > > On Jan 28, 1:50 pm, Steve Holden wrote: > > > > Shah Sultan Alam wrote: > > > > Hi Group, > > > > I have file with contents retrieved from mysql DB. > > > > which has a time field with type defined bigint

Re: Results of executing hyperlink in script

2009-01-28 Thread Jean-Paul Calderone
On Wed, 28 Jan 2009 23:14:59 +, MRAB wrote: Muddy Coder wrote: Hi Folks, My previous post got a many helps from the people, and I tested what they suggested. Since this topic maybe needed in future, so I drop these lines below to help the future programmers. The methods worked as below: 1

Re: dicts,instances,containers, slotted instances, et cetera.

2009-01-28 Thread Diez B. Roggisch
ocsch...@gmail.com schrieb: On Jan 28, 4:50 pm, Aaron Brady wrote: On Jan 28, 2:38 pm, ocsch...@gmail.com wrote: Hello, quoting myself from another thread today: There is the 'shelve' module. You could create a shelf that tells you the filename of the 5 other ones. A million keys should be

Re: dicts,instances,containers, slotted instances, et cetera.

2009-01-28 Thread ocschwar
On Jan 28, 5:21 pm, "Diez B. Roggisch" wrote: > ocsch...@gmail.com schrieb: > > > > > Hi, all. > > > I have an application that that creates, manipulates, and finally > > archives on disk 10^6 instances of an object that in CS/DB terms is > > best described as a relation. > > > It has 8 members, a

Re: dicts,instances,containers, slotted instances, et cetera.

2009-01-28 Thread ocschwar
On Jan 28, 4:50 pm, Aaron Brady wrote: > On Jan 28, 2:38 pm, ocsch...@gmail.com wrote: > > Hello, quoting myself from another thread today: > > There is the 'shelve' module.  You could create a shelf that tells you > the filename of the 5 other ones.  A million keys should be no > problem, I guess

Re: Function Application is not Currying

2009-01-28 Thread sln
On Wed, 28 Jan 2009 13:32:29 -0800 (PST), Xah Lee wrote: >Function Application is not Currying > >Xah Lee, 2009-01-28 > >In Jon Harrop's book Ocaml for Scientist at >http://www.ffconsultancy.com/products/ocaml_for_scientists/chapter1.html > >It says: > >Currying > >A curried function is a

Re: Results of executing hyperlink in script

2009-01-28 Thread MRAB
Muddy Coder wrote: Hi Folks, My previous post got a many helps from the people, and I tested what they suggested. Since this topic maybe needed in future, so I drop these lines below to help the future programmers. The methods worked as below: 1. This method was suggested by Cameron Laird:

Re: writing large dictionaries to file using cPickle

2009-01-28 Thread Aaron Brady
On Jan 28, 4:43 pm, perfr...@gmail.com wrote: > On Jan 28, 5:14 pm, John Machin wrote: > > > > > On Jan 29, 3:13 am, perfr...@gmail.com wrote: > > > > hello all, > > > > i have a large dictionary which contains about 10 keys, each key has a > > > value which is a list containing about 1 to 5 milli

Re: file date/time on windows

2009-01-28 Thread m.banaouas
thanks, someone gave me the solution: simply call time.localtime(...) instead of time.gmtime(...) The explorer file time is what I need because it's the only file date visible for most of users. So localtime is perfect for me. We are talking about the same file stored in a shared lan-computer-fold

Re: bigint to timestamp

2009-01-28 Thread John Machin
On Jan 29, 1:05 am, Jon Clements wrote: > On Jan 28, 1:50 pm, Steve Holden wrote: > > > > > Shah Sultan Alam wrote: > > > Hi Group, > > > I have file with contents retrieved from mysql DB. > > > which has a time field with type defined bigint(20) > > > I want to parse that field into timestamp fo

Re: Addition of multiprocessing ill-advised? (was: Python 3.0.1)

2009-01-28 Thread James Mills
Jesse: Can I mail you off-list regarding multiprocessing ? cheers James -- -- "Problems are solved by method" -- http://mail.python.org/mailman/listinfo/python-list

Results of executing hyperlink in script

2009-01-28 Thread Muddy Coder
Hi Folks, My previous post got a many helps from the people, and I tested what they suggested. Since this topic maybe needed in future, so I drop these lines below to help the future programmers. The methods worked as below: 1. This method was suggested by Cameron Laird: os.system("start %

Re: writing large dictionaries to file using cPickle

2009-01-28 Thread perfreem
On Jan 28, 5:14 pm, John Machin wrote: > On Jan 29, 3:13 am, perfr...@gmail.com wrote: > > > > > hello all, > > > i have a large dictionary which contains about 10 keys, each key has a > > value which is a list containing about 1 to 5 million (small) > > dictionaries. for example, > > > mydict = {

Re: what's the point of rpython?

2009-01-28 Thread Mike
On Jan 17, 5:55 pm, "Brendan Miller" wrote: > The python devs seem to > consider the GIL a non-issue, though they may change their mind in 3 > years when we all have 32 core desktops, For what it's worth, I am currently using Python to perform a scientific computation on 1400+ cores, and it seems

Re: Dynamic methods and lambda functions

2009-01-28 Thread Gabriel Genellina
En Wed, 28 Jan 2009 16:05:39 -0200, coutinhoti...@gmail.com escribió: I had the same problem myself. Mark's detailed explanation really helped me understand. I ended up doing something like: The code doesn't work as-is, could you please post a working version? Just for the record,

Re: dicts,instances,containers, slotted instances, et cetera.

2009-01-28 Thread Diez B. Roggisch
ocsch...@gmail.com schrieb: Hi, all. I have an application that that creates, manipulates, and finally archives on disk 10^6 instances of an object that in CS/DB terms is best described as a relation. It has 8 members, all of them common Python datatypes. 6 of these are set once and then not mo

Re: Python 3.0, 'Hello' < 42

2009-01-28 Thread Terry Reedy
Martin v. Löwis wrote: But the document also mentions that the result is not strictly "undefined" but "reproducable undetermined". What specific document are you looking at, and where specifically does it say that? I can't believe that the quotation marks indicate an actual quote, in particular

Re: writing large dictionaries to file using cPickle

2009-01-28 Thread John Machin
On Jan 29, 3:13 am, perfr...@gmail.com wrote: > hello all, > > i have a large dictionary which contains about 10 keys, each key has a > value which is a list containing about 1 to 5 million (small) > dictionaries. for example, > > mydict = {key1: [{'a': 1, 'b': 2, 'c': 'hello'}, {'d', 3, 'e': 4, 'f

Re: dicts,instances,containers, slotted instances, et cetera.

2009-01-28 Thread Aaron Brady
On Jan 28, 2:38 pm, ocsch...@gmail.com wrote: > Hi, all. > > I have an application that that creates, manipulates, and finally > archives on disk 10^6 instances of an object that in CS/DB terms is > best described as a relation. > > It has 8 members, all of them common Python datatypes. 6 of these

Re: writing large dictionaries to file using cPickle

2009-01-28 Thread Aaron Brady
On Jan 28, 10:13 am, perfr...@gmail.com wrote: > hello all, > > i have a large dictionary which contains about 10 keys, each key has a > value which is a list containing about 1 to 5 million (small) > dictionaries. for example, snip > but this takes just as long... any ideas ? is there a different

Re: New to python, open source Mac OS X IDE?

2009-01-28 Thread Aleksandar Radulovic
On Tue, Jan 27, 2009 at 11:06 PM, joseph.a.mar...@gmail.com wrote: > I'm on a Mac. I use Netbeans for Java, PHP, and C if needed. Do you > even use an IDE for Python? I'm on a Mac, too. I don't use a full-fledged IDE for Python development, nor I think it's necessary. > Any recommendations on op

Re: Sloooooowwwww WSGI restart

2009-01-28 Thread Aleksandar Radulovic
Hi there, On Wed, Jan 28, 2009 at 9:35 PM, Ron Garret wrote: > I'm running a WSGI app under apache/mod_wsgi and I've noticed that Off the bat, there's no reason to run an app under apache/mod_wsgi while developing it, ie. if u use Pylons or TurboGears, there's an easier way to serve the app (usi

Re: Sloooooowwwww WSGI restart

2009-01-28 Thread Jean-Paul Calderone
On Wed, 28 Jan 2009 13:35:56 -0800, Ron Garret wrote: I'm running a WSGI app under apache/mod_wsgi and I've noticed that whenever I restart the server after making a code change it takes a very long time (like a minute) before the script is active again. In other words, I do an apachectl restar

Sloooooowwwww WSGI restart

2009-01-28 Thread Ron Garret
I'm running a WSGI app under apache/mod_wsgi and I've noticed that whenever I restart the server after making a code change it takes a very long time (like a minute) before the script is active again. In other words, I do an apachectl restart, reload the page in my browser, and one minute late

Function Application is not Currying

2009-01-28 Thread Xah Lee
Function Application is not Currying Xah Lee, 2009-01-28 In Jon Harrop's book Ocaml for Scientist at http://www.ffconsultancy.com/products/ocaml_for_scientists/chapter1.html It says: Currying A curried function is a function which returns a function as its result. LOL. That is incorre

Re: Terminating a Python program that uses multi-process, multi-threading

2009-01-28 Thread MRAB
akineko wrote: Hello Python experts, I have a program that uses three processes (invoked by multiprocessing) and several threads. The program is terminated when ^C is typed (KeyboardInterrupt). The main process takes the KeyboardInterrupt Exception and it orderly shutdown the program. It works

Re: Recommendation for a small web framework like Perl's CGI::Application to run as CGI?

2009-01-28 Thread excord80
On Jan 28, 3:10 pm, Fred Pacquier wrote: > > That would be something close to Karrigell... You know, I stumbled across Karrigell while looking around but was initially uninterested because of what initially seems like a lack of direction. That is, they tell you that you can use it any way you lik

date handling problem

2009-01-28 Thread S.Selvam Siva
Hi all, I need to parse rss-feeds based on time stamp,But rss-feeds follow different standards of date(IST,EST etc). I dont know,how to standardize this standards.It will be helpful if you can hint me. -- Yours, S.Selvam -- http://mail.python.org/mailman/listinfo/python-list

Re: pyAA for Python2.5

2009-01-28 Thread Rob Williscroft
Kottiyath wrote in news:6a594643-f6a2-4d8d-aab3-27eb16cb2fb8 @b38g2000prf.googlegroups.com in comp.lang.python: > > I have mingw32-gcc in my path. If I try that too -it fails. > > C:\Documents and Settings\Guest\pyAA>python setup.py install -c > "mingw32-gcc" > invalid command name 'mingw32-gcc'

Terminating a Python program that uses multi-process, multi-threading

2009-01-28 Thread akineko
Hello Python experts, I have a program that uses three processes (invoked by multiprocessing) and several threads. The program is terminated when ^C is typed (KeyboardInterrupt). The main process takes the KeyboardInterrupt Exception and it orderly shutdown the program. It works fine in normal si

dicts,instances,containers, slotted instances, et cetera.

2009-01-28 Thread ocschwar
Hi, all. I have an application that that creates, manipulates, and finally archives on disk 10^6 instances of an object that in CS/DB terms is best described as a relation. It has 8 members, all of them common Python datatypes. 6 of these are set once and then not modified. 2 are modified around

RE: New to python, open source Mac OS X IDE?

2009-01-28 Thread Benjamin J. Racine
I've tried Wing IDE professional, vim, textmate, and PyDev and am intrigued by each one for different reasons. Whichever module browser I get more comfortable between Wing and PyDev/Eclipse is probably the direction I will end up going. Further, if I get the Hg and SVN plugins for PyDev/Eclips

Re: What is intvar? [Python Docs]

2009-01-28 Thread r
On Jan 26, 11:15 am, "W. eWatson" wrote: > I might be repeating myself here, but If anyone has pdf experience, and > could provide page numbers and maybe a TOC for some of Lundh's > contributions, that would be helpful. Did you try this one? http://effbot.org/tkinterbook/tkinter-index.htm here i

Re: Recommendation for a small web framework like Perl's CGI::Application to run as CGI?

2009-01-28 Thread Fred Pacquier
excord80 said : >> What are you looking for in your framework? > > Well, let's see. I don't need a templating library, since -- as you > pointed out -- I can just use Python's own. I don't need a db > interface (can just make my own dbapi calls if needed). Don't need url > mapping (can just use

Re: small python-cgi wiki?

2009-01-28 Thread Petite Abeille
On Jan 28, 2009, at 6:02 PM, Bernard Rankin wrote: I'm looking to set up a small private wiki, and am looking for recommendations. Some sort of CGI based package that I could just untar somewhere web accessable via Apache would be great. You might be interested by Nanoki, a small, simple

Re: Why doesn't eval of generator expression work with locals?

2009-01-28 Thread Peter Otten
Gabriel Genellina wrote: L = list(n for n in [globals(),locals()]) L[0] is L[1] > True L = list(n() for n in [globals,locals]) L[0] is L[1] > False > > (I think this has to do with free variables in the "right side" (after > the "in" keyword) of a generator expression; they ap

Re: Profiling Python Apps on Mac?

2009-01-28 Thread RGK
Philip Semanchuk wrote: Is there any reason that this wouldn't work? http://docs.python.org/library/hotshot.html It suggests that it doesn't work well with threads, but as I didn't know about any options, it's a step forward. Thanks for the pointer. :) R. -- http://mail.python.org/mailma

Re: Why doesn't eval of generator expression work with locals?

2009-01-28 Thread Gabriel Genellina
En Wed, 28 Jan 2009 16:00:43 -0200, Scott David Daniels escribió: Gabriel Genellina wrote: En Wed, 28 Jan 2009 01:36:57 -0200, Steve Holden escribió: Gabriel Genellina wrote: En Tue, 27 Jan 2009 22:17:16 -0200, Robert Kern escribió: I *thought* I did understand this until I came to t

Re: Recommendation for a small web framework like Perl's CGI::Application to run as CGI?

2009-01-28 Thread excord80
On Jan 28, 1:33 pm, Jeroen Ruigrok van der Werven wrote: > -On [20090128 19:01], excord80 (excor...@gmail.com) wrote: > > >Again, the solution must work for plain vanilla CGI. I don't have WSGI > >available. But thank you. > > It works for plain CGI. I myself use

Re: Profiling Python Apps on Mac?

2009-01-28 Thread Philip Semanchuk
On Jan 28, 2009, at 2:14 PM, RGK wrote: I'm writing a python app on a Mac (in Eclipse + PyDev w/ Python2.5 & wxPython under OSX 10.4) As I make program architecture decisions, it would be nice to be able to profile the choices. Should I add that extra thread? Is this big-assed xml obje

Profiling Python Apps on Mac?

2009-01-28 Thread RGK
I'm writing a python app on a Mac (in Eclipse + PyDev w/ Python2.5 & wxPython under OSX 10.4) As I make program architecture decisions, it would be nice to be able to profile the choices. Should I add that extra thread? Is this big-assed xml object I just created horribly bloated or kind of

Re: self-aware list of objects able to sense constituent member alterations?

2009-01-28 Thread Reckoner
On Jan 27, 9:46 pm, Steven D'Aprano wrote: > On Tue, 27 Jan 2009 13:16:36 -0800, Reckoner wrote: > > I'm not sure this is possible, but I would like to have a list of > > objects > > > A=[a,b,c,d,...,z] > > > where, in the midst of a lot of processing I might do something like, > > > A[0].do_some

Re: Python 3.0, 'Hello' < 42

2009-01-28 Thread Scott David Daniels
towit...@gmail.com wrote: Hello, In the 3.0 changes list there is mentioned that "<"-compares are not supported anymore if the compared types are different (except numbers). Like 42 < "Hello" did return True of False depending on the implementation but is now a TypeError. But the document als

Re: unable to print Unicode characters in Python 3

2009-01-28 Thread Ross Ridge
John Machin writes: > The only font choice offered apart from "Raster Fonts" in the Command > Prompt window's Properties box is "Lucida Console", not "Lucida Sans > Unicode". It will let me print Cyrillic characters from a C program, > but not Chinese. I'm off looking for how to get a better font.

Re: Recommendation for a small web framework like Perl's CGI::Application to run as CGI?

2009-01-28 Thread Jeroen Ruigrok van der Werven
-On [20090128 19:01], excord80 (excor...@gmail.com) wrote: >Again, the solution must work for plain vanilla CGI. I don't have WSGI >available. But thank you. It works for plain CGI. I myself use it for FCGI. -- Jeroen Ruigrok van der Werven / asmodai イェルーン ラウフロック ヴァン デル ウェルヴェン ht

Quickbooks

2009-01-28 Thread Stephen Chapman
Has anyone Implemented the Quickbooks COM object in Python. If so can you give me an Idea of where to begin. Thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 3.0, 'Hello' < 42

2009-01-28 Thread Martin v. Löwis
> But the document also mentions that the result is not strictly > "undefined" but "reproducable undetermined". What specific document are you looking at, and where specifically does it say that? I can't believe that the quotation marks indicate an actual quote, in particular because "reproducible

  1   2   >