Re: Popen Question

2010-11-08 Thread Lawrence D'Oliveiro
In message ib0kor01...@news5.newsguy.com, Chris Torek wrote: ['/bin/sh', '-c', 'echo', '$MYVAR'] (with arguments expressed as a Python list). /bin/sh takes the string after '-c' as a command, and the remaining argument(s) if any are assigned to positional parameters ($0, $1, etc).

Re: functions, list, default parameters

2010-11-08 Thread John Ladasky
On Nov 1, 7:30 pm, Lawrence D'Oliveiro l...@geek- central.gen.new_zealand wrote: In message 20101021235138.609fe...@geekmail.invalid, Andreas Waldenburger wrote: While not very commonly needed, why should a shared default argument be forbidden? Because it’s safer to disallow it than to

Re: Why flat is better than nested?

2010-11-08 Thread Lawrence D'Oliveiro
In message d4e7f8b9-9526-4bf5-b4d7-e398912eb...@b19g2000prj.googlegroups.com, rustom wrote: If you take zen seriously you dont get it If you dont take zen seriously you dont get it That -- seriously -- is zen I don’t get it. -- http://mail.python.org/mailman/listinfo/python-list

Re: Cross compiling (i386 from amd64) with distutils

2010-11-08 Thread Martin v. Loewis
You can solve some of the problems by editing the Makefile which it uses to learn the compiler options from. I don't understand this - do you mean I should edit the Makefile in the actual distutils package, and somehow use that in my project instead of setup.py? No. A python

Re: Why flat is better than nested?

2010-11-08 Thread Rustom Mody
On Oct 26, 12:11 am, kj no.em...@please.post wrote: In mailman.232.1288020268.2218.python-l...@python.org Steve Holden st...@holdenweb.com writes: And everyone taking the Zen too seriously should remember that it was written by Tim Peters one night during the commercial breaks between

Re: Deditor 0.2.2

2010-11-08 Thread Trevor J. Christensen
I really like that editor! Great work!! Great ideas!! On Sat, 2010-11-06 at 06:06 -0700, Kruptein wrote: Hey, I released version 0.2.2 of my pythonic text-editor Deditor. It adds the use of projects, a project is a set of files which you can open all at once to make development much

suds: how to set proxy?

2010-11-08 Thread Johann Spies
According to the suds documentation I can set the proxy setting like this: d = dict(http='host:80', https='host:443', ...) client.set_options(proxy=d) My problem is that you can only do that after 'client' was initiated like this: client = Client(url) And I need the proxy to reach the url. I

Re: Cross compiling (i386 from amd64) with distutils

2010-11-08 Thread Jason
On Nov 8, 4:16 pm, Martin v. Loewis mar...@v.loewis.de wrote: No. A python *installation* has a Makefile, in config/Makefile. If you want distutils to use different options, you could edit this Makefile. Oh, I see what you mean. But then it would affect *everything* I build on that machine, so

Re: Popen Question

2010-11-08 Thread Mark Wooding
Lawrence D'Oliveiro l...@geek-central.gen.new_zealand writes: In message ib0kor01...@news5.newsguy.com, Chris Torek wrote: ['/bin/sh', '-c', 'echo', '$MYVAR'] (with arguments expressed as a Python list). /bin/sh takes the string after '-c' as a command, and the remaining

YAMI4 v. 1.2.0 released

2010-11-08 Thread Maciej Sobczak
Hello, I am pleased to announce that the new version of YAMI4, 1.2.0, has been just released and is available for download: http://www.inspirel.com/yami4/ The most important addition for Python programmers is the Python 2.5+ module that complements the already existing Python 3.x library.

Python 2.7

2010-11-08 Thread Antonio de Haro Millan
I can not install *Python Imaging Library 1.1.7 for Python 2.6* (Windows only) because I have the *Python 2.7. *A solution please... ___ Antonio de Haro Millan www.de-haro.es Tf.34.639.972.872 -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 2.7

2010-11-08 Thread Felipe Bastos Nunes
Install the python 2.6.x :-) 2010/11/8, Antonio de Haro Millan antoniodeharomil...@gmail.com: I can not install *Python Imaging Library 1.1.7 for Python 2.6* (Windows only) because I have the *Python 2.7. *A solution please... ___ Antonio de Haro Millan www.de-haro.es

Re: Deditor 0.2.2

2010-11-08 Thread TheSeeker
On Nov 6, 7:06 am, Kruptein darragh@gmail.com wrote: Hey, I released version 0.2.2 of my pythonic text-editor  Deditor. It adds the use of projects, a project is a set of files which you can open all at once to make development much faster and easier. For more information visit

Re: Python 2.7

2010-11-08 Thread brf256
use python 2.6 :] - Braden Faulkner -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 2.7

2010-11-08 Thread David Robinow
On Mon, Nov 8, 2010 at 6:22 AM, Antonio de Haro Millan antoniodeharomil...@gmail.com wrote: I can not install Python Imaging Library 1.1.7 for Python 2.6 (Windows only) because I have the Python 2.7. A solution please... download http://effbot.org/media/downloads/PIL-1.1.7/win32-py2.7.exe --

Re: functions, list, default parameters

2010-11-08 Thread Roy Smith
In article iao0l0$nd...@lust.ihug.co.nz, Lawrence D'Oliveiro l...@geek-central.gen.new_zealand wrote: In message 20101021235138.609fe...@geekmail.invalid, Andreas Waldenburger wrote: While not very commonly needed, why should a shared default argument be forbidden? Because it’s

Re: A question about yield

2010-11-08 Thread Simon Brunning
On 7 November 2010 18:14, Chris Rebert c...@rebertia.com wrote: On Sun, Nov 7, 2010 at 9:56 AM, chad cdal...@gmail.com wrote: But what happens if the input file is say 250MB? Will all 250MB be loaded into memory at once? No. As I said, the file will be read from 1 line at a time, on an

Re: Allowing comments after the line continuation backslash

2010-11-08 Thread Neil Cerutti
On 2010-11-06, Steven D'Aprano st...@remove-this-cybersource.com.au wrote: styles = [ (normal, image, MainWindow.ColorsNormalList), (highlighted, highlight, MainWindow.ColorsHighlightedList), (selected,select,MainWindow.ColorsSelectedList)] Code

Re: Compare source code

2010-11-08 Thread Neil Cerutti
On 2010-11-07, Lawrence D'Oliveiro l...@geek-central.gen.new_zealand wrote: In message 8jftftfel...@mid.individual.net, Neil Cerutti wrote: The handsome ':' terminator of if/elif/if statements allows us to omit a newline, conserving vertical space. This improves the readability of certain

Re: Deditor 0.2.2

2010-11-08 Thread Jean-Michel Pichavant
TheSeeker wrote: On Nov 6, 7:06 am, Kruptein darragh@gmail.com wrote: Hey, I released version 0.2.2 of my pythonic text-editor Deditor. It adds the use of projects, a project is a set of files which you can open all at once to make development much faster and easier. For more

Re: Compare source code

2010-11-08 Thread Grant Edwards
On 2010-11-08, Roy Smith r...@panix.com wrote: In article ib7ifn$48...@reader1.panix.com, Grant Edwards inva...@invalid.invalid wrote: It's getting really hard to find high-DPI displays on laptops any more. 1600x1200 used to be available on 16 laptop displays, and that looked great. Even

Re: Compare source code

2010-11-08 Thread Steve Holden
On 11/8/2010 8:50 AM, Neil Cerutti wrote: [...] Interesting. I find conserving vertical space to be a big win. I understand why you'd enforce braces for virtually all code bodies in C. In C, I'm giving up the most obvious form of expression for something obviously more robust. In Python,

Question about expression evaluation

2010-11-08 Thread Scott Gould
Hi folks, This is a head-scratcher to me. I occasionally get this error: --- File /var/www/myproj/account/views.py, line 54, in account if request.account.is_instructor and request.account.contact and request.account.contact.relationship.institution_party_number: AttributeError:

Re: Question about expression evaluation

2010-11-08 Thread nn
On Nov 8, 11:17 am, Scott Gould zinck...@gmail.com wrote: Hi folks, This is a head-scratcher to me. I occasionally get this error: ---   File /var/www/myproj/account/views.py, line 54, in account     if request.account.is_instructor and request.account.contact and

Re: Question about expression evaluation

2010-11-08 Thread Jerry Hill
On Mon, Nov 8, 2010 at 11:17 AM, Scott Gould zinck...@gmail.com wrote: ---  File /var/www/myproj/account/views.py, line 54, in account    if request.account.is_instructor and request.account.contact and request.account.contact.relationship.institution_party_number: AttributeError: 'NoneType'

Re: How to get dynamically-created fxn's source?

2010-11-08 Thread gb345
In ib1fai$8g3$0...@news.t-online.com Peter Otten __pete...@web.de writes: gb345 wrote: For a project I'm working on I need a way to retrieve the source code of dynamically generated Python functions. (These functions are implemented dynamically in order to simulate partial application in

Re: Question about expression evaluation

2010-11-08 Thread Peter Otten
Scott Gould wrote: Hi folks, This is a head-scratcher to me. I occasionally get this error: --- File /var/www/myproj/account/views.py, line 54, in account if request.account.is_instructor and request.account.contact and

Re: Question about expression evaluation

2010-11-08 Thread Scott Gould
Thanks for the ideas, everyone. It's probably obvious that this is in a Django context, and while I do have WSGI configured to multi-thread its processes, there is nothing explicitly shared -- via threading, a multi-user situation, or otherwise -- about this data. It is entirely local to the

Re: Python 2.7

2010-11-08 Thread Jeff Hobbs
On Nov 8, 3:50 am, Felipe Bastos Nunes felipe.bast...@gmail.com wrote: Install the python 2.6.x :-) 2010/11/8, Antonio de Haro Millan antoniodeharomil...@gmail.com: I can not install *Python Imaging Library 1.1.7 for Python 2.6* (Windows only) because I have the *Python 2.7. *A solution

Re: Popen Question

2010-11-08 Thread Ian
On Nov 8, 2:43 am, m...@distorted.org.uk (Mark Wooding) wrote: I don’t know what happens to the extra arguments, but they just seem to be ignored if -c is specified. The argument to -c is taken as a shell script; the remaining arguments are made available as positional parameters to the

Re: Question about expression evaluation

2010-11-08 Thread Peter Otten
Scott Gould wrote: Thanks for the ideas, everyone. It's probably obvious that this is in a Django context, and while I do have WSGI configured to multi-thread its processes, there is nothing explicitly shared -- via threading, a multi-user situation, or otherwise -- about this data. It is

Re: Question about expression evaluation

2010-11-08 Thread Peter Otten
Scott Gould wrote: Thanks for the ideas, everyone. It's probably obvious that this is in a Django context, and while I do have WSGI configured to multi-thread its processes, there is nothing explicitly shared -- via threading, a multi-user situation, or otherwise -- about this data. It is

Re: Making ActivePython and Python co-exist on Windows

2010-11-08 Thread Sridhar Ratnakumar
On 2010-11-07, at 12:34 PM, Benjamin Kaplan wrote: On Sun, Nov 7, 2010 at 2:25 PM, CWC c...@cwc.name wrote: I'm new to Python. Is it possible to make ActivePython 3.12 and Python 3.12 co-exist on Windows? I've got an app which requires the former, but I want to stay with the latter, since

python dpx module

2010-11-08 Thread Brian Krusic
Hi all, Kind of at a loss here. trying to debug some old code belonging to some one else and I keep seeing an error; import dpx no module named dpx Would any one happen to know how I can get a hold if this elusive dpx Python module? -- http://mail.python.org/mailman/listinfo/python-list

Intel C Compiler

2010-11-08 Thread Drake
Hello, I'm an engineer who has access to the Intel C/C++ compiler (icc), and for the heck of it I compiled Python2.7 with it. Unsurprisingly, it compiled fine and functions correctly as far as I know. However, I was interested to discover that the icc compile printed literally thousands of

Re: Intel C Compiler

2010-11-08 Thread Stefan Krah
Drake cjdr...@gmail.com wrote: I'm an engineer who has access to the Intel C/C++ compiler (icc), and for the heck of it I compiled Python2.7 with it. Unsurprisingly, it compiled fine and functions correctly as far as I know. However, I was interested to discover that the icc compile printed

Re: python dpx module

2010-11-08 Thread Robert Kern
On 11/8/10 12:42 PM, Brian Krusic wrote: Hi all, Kind of at a loss here. trying to debug some old code belonging to some one else and I keep seeing an error; import dpx no module named dpx Would any one happen to know how I can get a hold if this elusive dpx Python module? You'll have to

populating a doubly-subscripted array

2010-11-08 Thread ghw
What am I missing? I am using Python 3.1.2. ff = [[0.0]*5]*5 ff#(lists 5x5 array of 0.0) for i in range(5): for j in range(3): ff[i][j] = i*10+j print (i,j,ff[i][j]) # correctly prints ff array values ff# try this and see what happens!

Re: populating a doubly-subscripted array

2010-11-08 Thread Robert Kern
On 11/8/10 3:56 PM, g...@accutrol.com wrote: What am I missing? I am using Python 3.1.2. ff = [[0.0]*5]*5 http://docs.python.org/faq/programming.html#how-do-i-create-a-multidimensional-list -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is

Re: Popen Question

2010-11-08 Thread Hans Mulder
Ian wrote: On Nov 8, 2:43 am, m...@distorted.org.uk (Mark Wooding) wrote: I don’t know what happens to the extra arguments, but they just seem to be ignored if -c is specified. The argument to -c is taken as a shell script; the remaining arguments are made available as positional parameters to

Re: Compare source code

2010-11-08 Thread Michael Torrie
On 11/06/2010 02:27 AM, Seebs wrote: On 2010-11-06, Steve Holden st...@holdenweb.com wrote: If someone were to use a text editor which had always historically mangled whitespace I would find myself wondering why they found it necessary to restrict themselves to such stone-age tools. I have

Re: functions, list, default parameters

2010-11-08 Thread Lawrence D'Oliveiro
In message mailman.608.129032.2218.python-l...@python.org, Robert Kern wrote: On 11/4/10 2:07 AM, Lawrence D'Oliveiro wrote: In messagemailman.504.1288718704.2218.python-l...@python.org, Robert Kern wrote: On 11/2/10 2:12 AM, Lawrence D'Oliveiro wrote: In

Re: populating a doubly-subscripted array

2010-11-08 Thread Ben Finney
g...@accutrol.com writes: What am I missing? You're missing the fact that Python doesn't have a built-in “array” type, nor really “subscripts” for them. ff = [[0.0]*5]*5 This creates a float object, ‘0.0’. It then creates a list containing five references to that same object. It then creates

Re: Allowing comments after the line continuation backslash

2010-11-08 Thread Lawrence D'Oliveiro
In message 87fwvdb69k.fsf@metalzone.distorted.org.uk, Mark Wooding wrote: Lawrence D'Oliveiro l...@geek-central.gen.new_zealand writes: for \ Description, Attr, ColorList \ in \ ( (normal, image, MainWindow.ColorsNormalList),

Re: populating a doubly-subscripted array

2010-11-08 Thread Mark Wooding
g...@accutrol.com writes: What am I missing? I am using Python 3.1.2. ff = [[0.0]*5]*5 ff#(lists 5x5 array of 0.0) for i in range(5): for j in range(3): ff[i][j] = i*10+j print (i,j,ff[i][j]) # correctly prints ff array values ff

Re: Popen Question

2010-11-08 Thread Lawrence D'Oliveiro
In message 4cd87b24$0$81481$e4fe5...@news.xs4all.nl, Hans Mulder wrote: But in this case the first positional argument is in $0. That’s what confused me. -- http://mail.python.org/mailman/listinfo/python-list

Re: Compare source code

2010-11-08 Thread Lawrence D'Oliveiro
In message 87oca1b8ba.fsf@metalzone.distorted.org.uk, Mark Wooding wrote: Vertical space is a limiting factor on how much code one can see at a time. One thing that helps me is that Emacs has commands for quickly jumping between matching brackets. Of course, this only works for

Re: Compare source code

2010-11-08 Thread Lawrence D'Oliveiro
In message ib698e$q4...@reader1.panix.com, Grant Edwards wrote: IOW, editing a loop or other control structure where you couldn't see both ends was problematic. Conserving vertical space avoids that problem. No it doesn’t. It just moves it to a different, arbitrary, point a few percent

Pythonic/idiomatic?

2010-11-08 Thread Seebs
I have an existing hunk of Makefile code: CPPFLAGS = $(filter -D* -I* -i* -U*,$(TARGET_CFLAGS)) For those not familiar with GNU makeisms, this means assemble a string which consists of all the words in $(TARGET_CFLAGS) which start with one of -D, -I, -i, or -U. So if you give it

Re: Compare source code

2010-11-08 Thread Lawrence D'Oliveiro
In message ib6hkq$ji...@reader1.panix.com, Grant Edwards wrote: ... though I'd still prefer a 4:3. 4:3 still seems to be the best. It gives you a landscape A3-proportional view (or two A4-proportioned portrait pages side by side), and the little bit of space left over at the top or bottom can

Re: functions, list, default parameters

2010-11-08 Thread Robert Kern
On 11/8/10 5:24 PM, Lawrence D'Oliveiro wrote: In messagemailman.608.129032.2218.python-l...@python.org, Robert Kern wrote: On 11/4/10 2:07 AM, Lawrence D'Oliveiro wrote: In messagemailman.504.1288718704.2218.python-l...@python.org, Robert Kern wrote: On 11/2/10 2:12 AM, Lawrence

Re: Pythonic/idiomatic?

2010-11-08 Thread geremy condra
On Mon, Nov 8, 2010 at 6:32 PM, Seebs usenet-nos...@seebs.net wrote: I have an existing hunk of Makefile code:        CPPFLAGS = $(filter -D* -I* -i* -U*,$(TARGET_CFLAGS)) For those not familiar with GNU makeisms, this means assemble a string which consists of all the words in $(TARGET_CFLAGS)

Commercial or Famous Applicattions.?

2010-11-08 Thread Jorge Biquez
Hello all. Newbie question. Sorry. Can you mention applications/systems/solutions made with Python that are well known and used by public in general? ANd that maybe we do not know they are done with Python? I had a talk with a friend, PHP-Only-Fan, and he said (you know the schema of those

Re: python test frameworks

2010-11-08 Thread Kev Dwyer
On Sun, 07 Nov 2010 09:01:42 -0800, rustom wrote: On Nov 7, 7:09 pm, Kev Dwyer kevin.p.dw...@gmail.com wrote: On Sun, 07 Nov 2010 10:56:46 +0530, Rustom Mody wrote: There are a large number of test frameworks in/for python.  Apart from what comes builtin with python there seems to be nose,

Re: Pythonic/idiomatic?

2010-11-08 Thread Ben Finney
Seebs usenet-nos...@seebs.net writes: I have a similar situation in a Python context, and I am wondering whether this is an idiomatic spelling: ' '.join([x for x in target_cflags.split() if re.match('^-[DIiU]', x)]) This appears to do the same thing, but is it an idiomatic use of list

Re: Commercial or Famous Applicattions.?

2010-11-08 Thread alex23
Jorge Biquez jbiq...@icsmx.com wrote: Can you mention applications/systems/solutions made with Python that are well known and used by public in general? ANd that maybe we do not know they are done with Python? http://python.org/about/success/ This comes up semi-regularly so you might be able

Re: Commercial or Famous Applicattions.?

2010-11-08 Thread rantingrick
Commenting on which language is better than this one or which language boasts the most achievements is nothing more than time very poorly spent. Some people will find Python to be the best thing since sliced bread (and i am one of them!), however others will find Python to be the worst language

Re: Compare source code

2010-11-08 Thread Seebs
On 2010-11-08, Michael Torrie torr...@gmail.com wrote: On 11/06/2010 02:27 AM, Seebs wrote: I have yet to find an editor that allows me to, well, *edit*, more comfortably than vi. Indeed vi (or in my case, vim) works wonderfully well with python. I always use the following vim settings on

Re: Compare source code

2010-11-08 Thread Seebs
On 2010-11-08, Lawrence D'Oliveiro l...@geek-central.gen.new_zealand wrote: In message 87oca1b8ba.fsf@metalzone.distorted.org.uk, Mark Wooding wrote: Vertical space is a limiting factor on how much code one can see at a time. One thing that helps me is that Emacs has commands for

Re: Pythonic/idiomatic?

2010-11-08 Thread Seebs
On 2010-11-09, Ben Finney ben+pyt...@benfinney.id.au wrote: For this purpose, there is a generator expression syntax URL:http://docs.python.org/reference/expressions.html#generator-expressions, almost identical to a list comprehension except without the enclosing brackets. ' '.join(x for

Re: Commercial or Famous Applicattions.?

2010-11-08 Thread brf256
Mailman is of course. As well as redhats anaconda installer and google uses python internally for many of there medium sized projects. Also, calibre, gwibber, portage pms, ubuntu software center, YUM pms and many others including YouTube. Moral is many big companies do both for products and

Re: Commercial or Famous Applicattions.?

2010-11-08 Thread Seebs
On 2010-11-09, rantingrick rantingr...@gmail.com wrote: Commenting on which language is better than this one or which language boasts the most achievements is nothing more than time very poorly spent. This is mostly true, but I don't think it's entirely true. It is certainly possible for

Re: Popen Question

2010-11-08 Thread Ian
On Nov 8, 3:35 pm, Hans Mulder han...@xs4all.nl wrote: Perhaps this example better demonstrates what is going on: p = subprocess.Popen(['echo one $0 three $1 five', 'two', 'four'], ...                      shell=True) one two three four five Maybe I'm thick, but I still don't

Re: Commercial or Famous Applicattions.?

2010-11-08 Thread John Nagle
On 11/8/2010 4:47 PM, brf...@gmail.com wrote: Mailman is of course. As well as redhats anaconda installer and google uses python internally for many of there medium sized projects. Also, calibre, gwibber, portage pms, ubuntu software center, YUM pms and many others including YouTube. Moral is

Re: Pythonic/idiomatic?

2010-11-08 Thread Ben Finney
Seebs usenet-nos...@seebs.net writes: On 2010-11-09, Ben Finney ben+pyt...@benfinney.id.au wrote: The regex is less clear for the purpose than I'd prefer. For a simple ???is it a member of this small set???, I'd find it more readable to use a simple list of the actual strings:: '

Re: Commercial or Famous Applicattions.?

2010-11-08 Thread Alan Gauld
Jorge Biquez jbiq...@icsmx.com wrote Can you mention applications/systems/solutions made with Python that are well known and used by public in general? ANd that maybe we do not know they are done with Python? The Python web site has an advocacy section, you will find several success stories

Re: Pythonic/idiomatic?

2010-11-08 Thread Tim Chase
On 11/08/10 18:34, Seebs wrote: On 2010-11-09, Ben Finneyben+pyt...@benfinney.id.au wrote: ' '.join(x for x in target_cflags.split() if re.match('^-[DIiU]', x)) Ahh, handy. ... The latter works only in Python with set literals (Python 2.7 or later). I think we're stuck with

Re: Commercial or Famous Applicattions.?

2010-11-08 Thread rantingrick
On Nov 8, 6:43 pm, Seebs usenet-nos...@seebs.net wrote: On 2010-11-09, rantingrick rantingr...@gmail.com wrote: It is certainly possible for someone else's language choices to affect me (if I get called in to fix their code).  And as a result, I do try to do at least a little language

Re: [Tutor] Commercial or Famous Applicattions.?

2010-11-08 Thread Luke Paireepinart
just off the top of my head... NASA uses it. Lots of games use Python as their game logic/scripting language (how many use PHP? probably approaching 0. LUA is more popular than Python but Python is much more popular than PHP). The first ever bittorrent client (the official one) was written in

Define macro when invoking setup.py

2010-11-08 Thread Jason
I'd like to be able switch between building my C extension with a certain preprocessor macro defined or not defined. I'm using the rudimentary distutils setup.py example given here: http://docs.python.org/extending/building.html Is there a command line option that distutils.core.setup() will

Re: http error 301 for urlopen

2010-11-08 Thread Lawrence D'Oliveiro
In message 4cd7987e$0$1674$742ec...@news.sonic.net, John Nagle wrote: It's the New York Times' paywall. They're trying to set a cookie, and will redirect the URL until you store and return the cookie. And if they find out you’re acessing them from a script, they’ll probably try to find a

Re: Silly newbie question - Carrot character (^)

2010-11-08 Thread Lawrence D'Oliveiro
In message mailman.697.1289067607.2218.python-l...@python.org, Dennis Lee Bieber wrote: On Sat, 6 Nov 2010 10:22:47 -0400, Philip Semanchuk phi...@semanchuk.com declaimed the following in gmane.comp.python.general: Some people might think the language ref is a fine place to direct

Re: subclassing str

2010-11-08 Thread Lawrence D'Oliveiro
In message 5dlbo.1024$w8@twister2.libero.it, not1xor1 (Alessandro) wrote: I'm already using plain functions, but thought that wrapping most of them in a str subclass would let me save some time and yield cleaner and more manageable code How exactly does a.f(b, c) save time over

Re: Pythonic/idiomatic?

2010-11-08 Thread Seebs
On 2010-11-09, Ben Finney ben+pyt...@benfinney.id.au wrote: Seebs usenet-nos...@seebs.net writes: I think we're stuck with backwards compatibility at least as far as 2.4. Then you don't yet have the ???any??? and ???all??? built-in functions, or the tuple-of-prefixes feature of

Re: Silly newbie question - Carrot character (^)

2010-11-08 Thread Seebs
On 2010-11-09, Lawrence D'Oliveiro l...@geek-central.gen.new_zealand wrote: In message mailman.697.1289067607.2218.python-l...@python.org, Dennis Lee Bieber wrote: Have you ever looked at the reference manual for Ada? Or even worse, the annotated reference. I thought annotations were

Re: Define macro when invoking setup.py

2010-11-08 Thread Christian Heimes
Am 09.11.2010 03:09, schrieb Jason: I'd like to be able switch between building my C extension with a certain preprocessor macro defined or not defined. I'm using the rudimentary distutils setup.py example given here: http://docs.python.org/extending/building.html Is there a command line

Re: subclassing str

2010-11-08 Thread rantingrick
On Nov 8, 8:18 pm, Lawrence D'Oliveiro l...@geek- central.gen.new_zealand wrote: In message 5dlbo.1024$w8@twister2.libero.it, not1xor1 (Alessandro) wrote: I'm already using plain functions, but thought that wrapping most of them in a str subclass would let me save some time and yield

Re: Define macro when invoking setup.py

2010-11-08 Thread Jason
On Nov 9, 10:48 am, Christian Heimes li...@cheimes.de wrote: You were looking at the wrong manual. Readhttp://docs.python.org/distutils/setupscript.html#preprocessor-options Extension(...,           define_macros=[('NDEBUG', '1'),                          ('HAVE_STRFTIME', None)],          

Re: Define macro when invoking setup.py

2010-11-08 Thread Jason
On Nov 9, 10:56 am, Jason jason.hee...@gmail.com wrote: But can they be selected or set from the command line, so I can do, say, setup.py build -DDEBUG=1? Just answered my own question: there's an option for build_ext (NOT build) that allows this. Thanks, Jason --

Re: Is there a way to pring a list object in Python?

2010-11-08 Thread Zeynel
On Oct 31, 2:44 pm, Benjamin Kaplan benjamin.kap...@case.edu wrote: Rep() = Rep object Rep.all() = Query object list(Rep.all()) = List of Rep objects. list(Rep.all())[0] = A single Rep object list(Rep.all())[0].replist = A list Thanks! This was very helpful. --

Re: Commercial or Famous Applicattions.?

2010-11-08 Thread John Bond
On 9/11/2010 12:18 AM, Jorge Biquez wrote: Hello all. Newbie question. Sorry. Can you mention applications/systems/solutions made with Python that are well known and used by public in general? ANd that maybe we do not know they are done with Python? ... Jorge Biquez Keep in mind that

Re: Commercial or Famous Applicattions.?

2010-11-08 Thread Lawrence D'Oliveiro
In message mailman.755.1289276189.2218.python-l...@python.org, John Bond wrote: I once got asked to write a list things that I'd make different in the technology world if I could, to make it better for everyone. Number 3 was everywhere you now see Javascript or PHP, you'd see Python instead.

Re: Commercial or Famous Applicattions.?

2010-11-08 Thread Lawrence D'Oliveiro
In message mailman.749.1289261914.2218.python-l...@python.org, Jorge Biquez wrote: ... there are not too many applications done with Python than the ones done with PHP ... PHP is only used for server-side Web applications, nothing else. Python is used for lots of things, on and off the Web.

Re: Silly newbie question - Caret character (^)

2010-11-08 Thread Lawrence D'Oliveiro
In message slrnidhcns.9m6.usenet-nos...@guild.seebs.net, Seebs wrote: On 2010-11-09, Lawrence D'Oliveiro l...@geek-central.gen.new_zealand wrote: In message mailman.697.1289067607.2218.python-l...@python.org, Dennis Lee Bieber wrote: Have you ever looked at the reference manual for Ada?

Re: Commercial or Famous Applicattions.?

2010-11-08 Thread John Bond
On 9/11/2010 5:54 AM, Lawrence D'Oliveiro wrote: In messagemailman.755.1289276189.2218.python-l...@python.org, John Bond wrote: I once got asked to write a list things that I'd make different in the technology world if I could, to make it better for everyone. Number 3 was everywhere you now

Re: JavaScript vs Python (was Re: Commercial or Famous Applicattions.?)

2010-11-08 Thread Lawrence D'Oliveiro
In message mailman.756.1289284312.2218.python-l...@python.org, John Bond wrote: On 9/11/2010 5:54 AM, Lawrence D'Oliveiro wrote: In messagemailman.755.1289276189.2218.python-l...@python.org, John Bond wrote: I once got asked to write a list things that I'd make different in the technology

Re: Silly newbie question - Caret character (^)

2010-11-08 Thread Seebs
On 2010-11-09, Lawrence D'Oliveiro l...@geek-central.gen.new_zealand wrote: In message slrnidhcns.9m6.usenet-nos...@guild.seebs.net, Seebs wrote: On 2010-11-09, Lawrence D'Oliveiro l...@geek-central.gen.new_zealand wrote: Or even worse, the annotated reference. I thought annotations were

Re: Compare source code

2010-11-08 Thread Arnaud Delobelle
Lawrence D'Oliveiro l...@geek-central.gen.new_zealand writes: In message 87oca1b8ba.fsf@metalzone.distorted.org.uk, Mark Wooding wrote: Vertical space is a limiting factor on how much code one can see at a time. One thing that helps me is that Emacs has commands for quickly jumping

How to Write a Winning Dissertation

2010-11-08 Thread Karis Lee
Writing a Dissertation requires mastery of research methods for valid and reliable data collection, availability of all the resources and perfection of dissertation format, structure and citation styles. This article offers some guiltiness about how to write a winning dissertation. Dissertation

Re: JavaScript vs Python (was Re: Commercial or Famous Applicattions.?)

2010-11-08 Thread Chris Rebert
On Mon, Nov 8, 2010 at 10:52 PM, Lawrence D'Oliveiro l...@geek-central.gen.nz wrote: In message mailman.756.1289284312.2218.python-l...@python.org, John Bond wrote: On 9/11/2010 5:54 AM, Lawrence D'Oliveiro wrote: In messagemailman.755.1289276189.2218.python-l...@python.org, John Bond wrote:

Re: Silly newbie question - Caret character (^)

2010-11-08 Thread Lawrence D'Oliveiro
In message slrnidhsbg.g2d.usenet-nos...@guild.seebs.net, Seebs wrote: Not so much turgidity as being WRONG. Consistently and often. Wow. And the guy’s written so many books; how does he get away with it? (I know too little about C++ to criticize is writings about it, but people have told me

Re: Pythonic/idiomatic?

2010-11-08 Thread Arnaud Delobelle
Seebs usenet-nos...@seebs.net writes: I have an existing hunk of Makefile code: CPPFLAGS = $(filter -D* -I* -i* -U*,$(TARGET_CFLAGS)) For those not familiar with GNU makeisms, this means assemble a string which consists of all the words in $(TARGET_CFLAGS) which start with one of -D,

Re: How to test if a module exists?

2010-11-08 Thread Lawrence D'Oliveiro
In message roy-4c92bb.16523506112...@news.panix.com, Roy Smith wrote: On the other hand, if your module's bug is that it in turn imports some other module, which doesn't exist, you'll also get an ImportError. Does it really matter? Either way, the module is unusable. --

Re: JavaScript vs Python (was Re: Commercial or Famous Applicattions.?)

2010-11-08 Thread Ian Kelly
On Tue, Nov 9, 2010 at 12:30 AM, Chris Rebert c...@rebertia.com wrote: The Good Parts of it anyway. All hail William Goldman! Wait, what were talking about? Ian -- http://mail.python.org/mailman/listinfo/python-list

[issue10217] python-2.7.amd64.msi install fails

2010-11-08 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: IIUC, Manfred's pythonInstallLog.zip is now from a successful installation, so it is unfortunately of little help. We really would need a log of a failed installation. -- ___ Python tracker

[issue10325] PY_LLONG_MAX co - preprocessor constants or not?

2010-11-08 Thread Hallvard B Furuseth
Hallvard B Furuseth h.b.furus...@usit.uio.no added the comment: Mark Dickinson writes: Here's a patch (against py3k) incorporating your suggestions. Would you be willing to review? Looks fine to me. (Actually the gcc branch makes the same assumptions as the final branch, but then I expect

[issue10350] errno is read too late

2010-11-08 Thread Hallvard B Furuseth
New submission from Hallvard B Furuseth h.b.furus...@usit.uio.no: errno is sometimes read too late after the error: After another call may have modified it. Here's a patch against py3k. Most of it or a variant applies to 2.7 too, but I haven't really looked at that. I've not looked at math

[issue10325] PY_LLONG_MAX co - preprocessor constants or not?

2010-11-08 Thread Hallvard B Furuseth
Hallvard B Furuseth h.b.furus...@usit.uio.no added the comment: I wrote: BTW, do you know of any modern non-Windows platforms that don't define LLONG_MIN and LLONG_MAX? It may well be that the two's complement fallback hasn't been exercised in recent years. Anyting compiled with strict

[issue10351] to introduce autocompletion for keys in dictionaries (patch attached)

2010-11-08 Thread Valery Khamenya
New submission from Valery Khamenya khame...@gmail.com: 1. The patch introduces autocompletion for keys in dictionaries (patch attached) 2. The patched rlcompleter as such works OK for unicode dictionary keys as well. All tests pass OK. HOWEVER, readline's completion mechanism seem to be

[issue10352] rlcompleter.py has no tests in trunk

2010-11-08 Thread Valery Khamenya
New submission from Valery Khamenya khame...@gmail.com: rlcompleter.py has no test_rlcompleter in trunk, see http://svn.python.org/view/python/trunk/Lib/test/ There is one in 2.7 though. Remark: the issue http://bugs.python.org/issue10351 introduces autocompletion patch and comes with new

  1   2   3   >