Re: getting command line in python

2011-11-09 Thread Matej Cepl
Dne 8.11.2011 23:36, MrSmile napsal(a): Thank you all, that was it that I was searching for you. Except that most likely it wasn't the right answer. Take a look at http://docs.python.org/library/argparse.html (or optparse, if you are on Python < 2.7). Best, Matěj -- http://mail.python.org/

Re: overview on dao

2011-11-09 Thread Simeon Chaos
On Nov 9, 8:55 am, MRAB wrote: > On 09/11/2011 00:13, Simeon Chaos wrote: > > > > > > > > > > > On Nov 9, 1:52 am, Dennis Lee Bieber  wrote: > >> On Mon, 7 Nov 2011 21:10:59 -0800 (PST), Simeon Chaos > >>  declaimed the following in > >> gmane.comp.python.general: > > >>> Dao is a a functional lo

RE: memory management

2011-11-09 Thread Juan Declet-Barreto
After some exception catching, I have found that my program is throwing a MemoryError exception numerous times (~7 iterations of the main loop that processes list elements) until python25\python.exe crashes (Windows XP environment). I implemented Dave Angel's suggestions re: processing each li

Re: all() is slow?

2011-11-09 Thread Hans Mulder
On 9/11/11 02:30:48, Chris Rebert wrote: Burn him! Witch! Witch! Burn him! His code turned me into a newt! -- Sent nailed to a coconut carried by swallow. Is that a European swallow or an African swallow? -- HansM -- http://mail.python.org/mailman/listinfo/python-list

Re: file extension while saving Python files

2011-11-09 Thread 88888 Dihedral
In testing and debug it is better that a program can be easily modified and easy to set break point and dump values. Thus an interpreter environment is more convenient. But in the final version a compiler can speed up a lot! -- http://mail.python.org/mailman/listinfo/python-list

guppy

2011-11-09 Thread Juan Declet-Barreto
I am trying to build guppy on Python 2.5, but am getting an "initializer element is not constant" error from gcc. I have found very little on this issue in the fora when looking for the general cause of the error; there is even less that is specific to a guppy build on Python 2.5. One recomme

Re: guppy

2011-11-09 Thread Christian Heimes
Am 09.11.2011 20:08, schrieb Juan Declet-Barreto: > I am trying to build guppy on Python 2.5, but am getting an "initializer > element is not constant" error from gcc. I have found very little on this > issue in the fora when looking for the general cause of the error; there is > even less that

Re: guppy

2011-11-09 Thread Benjamin Kaplan
On Wed, Nov 9, 2011 at 2:08 PM, Juan Declet-Barreto wrote: > > I am trying to build guppy on Python 2.5, but am getting an "initializer > element is not constant" error from gcc. I have found very little on this > issue in the fora when looking for the general cause of the error; there is > eve

RE: guppy

2011-11-09 Thread Juan Declet-Barreto
I am using Cygwin build of Python2.6. This Cygwin install has both a Cygwin gcc (versions 3.4.4 and 4.5.3) and mingw32 (3.4.4), as listed in lib/gcc/. I also tried the mingw32 shell separately, but I get the same results even when I pass the "-c mingw32" option. The error is reproduced below

Re: guppy

2011-11-09 Thread Christian Heimes
Am 09.11.2011 20:38, schrieb Juan Declet-Barreto: > I am using Cygwin build of Python2.6. This Cygwin install has both a Cygwin > gcc (versions 3.4.4 and 4.5.3) and mingw32 (3.4.4), as listed in lib/gcc/. > > I also tried the mingw32 shell separately, but I get the same results even > when I p

Re: all() is slow?

2011-11-09 Thread John Nagle
On 11/7/2011 1:00 PM, OKB (not okblacke) wrote: I noticed this (Python 2.6.5 on Windows XP): CPython is slow. It's a naive interpreter. There's almost no optimization during compilation. Try PyPy or Shed Skin. John Nagle -- http://mail.python.org/m

Re: all() is slow?

2011-11-09 Thread Devin Jeanpierre
> If it were someone other than Raymond Hettinger responsible for the use > of exec in namedtuple, I'd be a lot more suspicious of it. I'm not going to be less suspicious based on a name. It reads like insanity, and the justification was terrible. Devin On Tue, Nov 8, 2011 at 9:47 PM, Steven D'A

Re: all() is slow?

2011-11-09 Thread Steven D'Aprano
On Wed, 09 Nov 2011 18:01:16 -0500, Devin Jeanpierre wrote: >> If it were someone other than Raymond Hettinger responsible for the use >> of exec in namedtuple, I'd be a lot more suspicious of it. > > I'm not going to be less suspicious based on a name. Neither am I. I am less suspicious based o

Re: all() is slow?

2011-11-09 Thread Chris Angelico
On Thu, Nov 10, 2011 at 10:01 AM, Devin Jeanpierre wrote: >> If it were someone other than Raymond Hettinger responsible for the use >> of exec in namedtuple, I'd be a lot more suspicious of it. > > I'm not going to be less suspicious based on a name. It reads like > insanity, and the justificatio

Re: easy_install doesn't install non-package *.py file

2011-11-09 Thread Makoto Kuwata
On Wed, Nov 9, 2011 at 4:09 AM, Terry Reedy wrote: > On 11/7/2011 11:32 PM, Makoto Kuwata wrote: >> >> I got trouble about easy_install command. >> >> My package: >> >>   README.rst >>   setup.py >>   foobar/ >>   foobar/__init__.py >>   foobar/data/ >>   foobar/data/template.py >> >> In the above

Re: all() is slow?

2011-11-09 Thread Devin Jeanpierre
> Neither am I. I am less suspicious based on a reputation. Raymond is a > well-known, trusted senior Python developer who knows what he is doing. I don't really know anything about him or why people respect him, so I have no reason to share your faith. > It reads fine, and the justification is p

Re: all() is slow?

2011-11-09 Thread Devin Jeanpierre
> Well. It reads fine in a certain sense, in that I can figure out > what's going on (although I have some troubles figuring out why the > heck certain things are in the code). The issue is that what's going > on is otherworldly: this is not a Python pattern, this is not a normal > approach. To me,

Re: guppy

2011-11-09 Thread David Robinow
On Wed, Nov 9, 2011 at 2:38 PM, Juan Declet-Barreto wrote: > I am using Cygwin build of Python2.6.  This Cygwin install has both a Cygwin > gcc (versions 3.4.4 and 4.5.3) and mingw32 (3.4.4), as listed in lib/gcc/. > > I also tried the mingw32 shell separately, but I get the same results even >

Re: all() is slow?

2011-11-09 Thread Ian Kelly
On Wed, Nov 9, 2011 at 6:26 PM, Devin Jeanpierre wrote: > The use of exec also results in (seemingly) arbitrary constraints on > the input. Like, why can't "--" be a name? Because exec? Is there some > other reason? That's by design, not because of exec. The names are supposed to be actual Pytho

Re: easy_install doesn't install non-package *.py file

2011-11-09 Thread Makoto Kuwata
On Thu, Nov 10, 2011 at 9:58 AM, Makoto Kuwata wrote: > On Wed, Nov 9, 2011 at 4:09 AM, Terry Reedy wrote: >> On 11/7/2011 11:32 PM, Makoto Kuwata wrote: >>> >>> I got trouble about easy_install command. >>> >>> My package: >>> >>>   README.rst >>>   setup.py >>>   foobar/ >>>   foobar/__init__.p

Re: all() is slow?

2011-11-09 Thread alex23
On Nov 10, 8:16 am, John Nagle wrote: >      CPython is slow. It's a naive interpreter.  There's > almost no optimization during compilation.  Try PyPy > or Shed Skin. Sometimes people need to understand the performance characteristics of CPython because it's what they have to use. Pointing them

Re: all() is slow?

2011-11-09 Thread alex23
On Nov 10, 11:26 am, Devin Jeanpierre wrote: > I don't really know anything about him or why people respect him, so I > have no reason to share your faith. But you're happy to accept the opinions of random posters saying "exec is evil"? (And it's really not a good idea to be proud of your ignoran

Re: all() is slow?

2011-11-09 Thread Devin Jeanpierre
> (And it's really not a good idea to be proud of your > ignorance...) I wasn't bragging. > But you're happy to accept the opinions of random posters saying "exec > is evil"? [...] > As opposed to your in-depth critique? [...] > No, instead you have a thread full of people happy to criticise > so

mailing list

2011-11-09 Thread paula gray
-- http://mail.python.org/mailman/listinfo/python-list

Re: easy_install doesn't install non-package *.py file

2011-11-09 Thread Chris Angelico
On Thu, Nov 10, 2011 at 11:58 AM, Makoto Kuwata wrote: > I want to use template names according to language, > such as template.py, template.html, template.rst, template.js, and so on. > You may have another problem here. Everyone and everything that looks at these will expect them to be Python,

Re: all() is slow?

2011-11-09 Thread Steven D'Aprano
On Wed, 09 Nov 2011 19:50:42 -0800, alex23 wrote: >> I pointed this out in a thread full of people saying "never EVER use >> exec this way", so it's obviously not just me that thinks this is >> awful. > > No, instead you have a thread full of people happy to criticise > something for which they'r

Re: all() is slow?

2011-11-09 Thread Steven D'Aprano
On Wed, 09 Nov 2011 20:26:56 -0500, Devin Jeanpierre wrote: >> Neither am I. I am less suspicious based on a reputation. Raymond is a >> well-known, trusted senior Python developer who knows what he is doing. > > I don't really know anything about him or why people respect him, so I > have no rea