ANN: wxPython 2.8.9.2 release

2009-02-21 Thread Robin Dunn
The wxWidgets team is in the early stages of preparing for a 2.8.10 release, but I already had a set of 2.8.9.2 release candidate files that I made a few days ago. Since it's still possible that there could be delays in the 2.8.10 release I thought that it would be nice to go ahead and release

Re: import not working?

2009-02-21 Thread Gabriel Genellina
En Fri, 20 Feb 2009 22:40:03 -0200, Lionel lionel.ke...@gmail.com escribió: Okay, moving the wx example into the same directory containing the first example that was working fixed it. This directory only contains these two modules and nothing else. The old directory which contained the

Re: Pythonic way to determine if one char of many in a string

2009-02-21 Thread Gabriel Genellina
En Sat, 21 Feb 2009 01:14:02 -0200, odeits ode...@gmail.com escribió: On Feb 15, 11:31 pm, odeits ode...@gmail.com wrote: It seems what you are actually testing for is if the intersection of the two sets is not empty where the first set is the characters in your word and the second set is the

python contextmanagers and ruby blocks

2009-02-21 Thread Alia Khouri
As an exercise, I recently translated one of my python scripts (http:// code.activestate.com/recipes/576643/) to haskell (a penultimate version exists at http://groups.google.com/group/comp.lang.haskell/browse_thread/thread/fb1ebd986b44244e# in case anyone is interested) with the result that

Re: function factory question: embed current values of object attributes

2009-02-21 Thread Alan Isaac
Terry Reedy wrote: You are now describing a function closure. Here is an example that might help. It does. Thanks, Alan -- http://mail.python.org/mailman/listinfo/python-list

Re: function factory question: embed current values of object attributes

2009-02-21 Thread Alan Isaac
Gabriel Genellina wrote: If you want a frozen function (that is, a function already set-up with the parameters taken from the current values of x.a, x.b) use functools.partial: OK, that's also a nice idea. Thanks! Alan -- http://mail.python.org/mailman/listinfo/python-list

Re: Using clock() in threading on Windows

2009-02-21 Thread Martin v. Löwis
Would it not be better to use time.clock() instead? If you really want to reconsider this implementation, I think it would be best to use relative timeouts all the way down to the system. In the specific case of Windows, WaitForSingleObject expects a relative number of milliseconds (i.e. a wait

Python dictionary size/entry limit?

2009-02-21 Thread intelliminer
I wrote a script to process textual data and extract phrases from them, storing these phrases in a dictionary. It encounters a MemoryError when there are about 11.18M keys in the dictionary, and the size is about 1.5GB. I tried multiple times, and the error occurs everytime at exactly the same

Re: Python dictionary size/entry limit?

2009-02-21 Thread Tino Wildenhain
intellimi...@gmail.com wrote: I wrote a script to process textual data and extract phrases from them, storing these phrases in a dictionary. It encounters a MemoryError when there are about 11.18M keys in the dictionary, and the size is about 1.5GB. I tried multiple times, and the error occurs

Re: Python dictionary size/entry limit?

2009-02-21 Thread intelliminer
On Feb 21, 6:25 pm, Tino Wildenhain t...@wildenhain.de wrote: intellimi...@gmail.com wrote: I wrote a script to process textual data and extract phrases from them, storing these phrases in a dictionary. It encounters a MemoryError when there are about 11.18M keys in the dictionary, and

Re: Python dictionary size/entry limit?

2009-02-21 Thread Stefan Behnel
intellimi...@gmail.com wrote: I wrote a script to process textual data and extract phrases from them, storing these phrases in a dictionary. It encounters a MemoryError when there are about 11.18M keys in the dictionary, and the size is about 1.5GB. [...] I have 1GB of pysical memory and 3GB

Re: python contextmanagers and ruby blocks

2009-02-21 Thread Francesco Bochicchio
On Sat, 21 Feb 2009 00:46:08 -0800, Alia Khouri wrote: As an exercise, I recently translated one of my python scripts (http:// code.activestate.com/recipes/576643/) to haskell (a penultimate version exists at

Re: python contextmanagers and ruby blocks

2009-02-21 Thread Alia K
Francesco wrote: ... ruby code that shows the most twisted 'Hellow world' example I have ever seen :-) ... and I was gunning for the simplest possible example (-: ... python code doing the same thing - apparently - of prevous ruby code, using context managers in a way that I believe the

TypeError: descriptor 'replace' requires a 'str' object but received a 'unicode'

2009-02-21 Thread Jaap van Wingerde
# -*- coding: utf_8 -*- Omschrijving = u'priv? assuranti?n' # string from a bank.csv Omschrijving = str.replace(Omschrijving, priv?, 'privé') Omschrijving = str.replace(Omschrijving, Assuranti?n, 'Assurantiën') print Omschrijving When I run this script I get the following message. Traceback

Re: TypeError: descriptor 'replace' requires a 'str' object but received a 'unicode'

2009-02-21 Thread Stefan Behnel
Jaap van Wingerde wrote: # -*- coding: utf_8 -*- Omschrijving = u'priv? assuranti?n' # string from a bank.csv Omschrijving = str.replace(Omschrijving, priv?, 'privé') Omschrijving = str.replace(Omschrijving, Assuranti?n, 'Assurantiën') print Omschrijving When I run this script I get the

ordinal not in range

2009-02-21 Thread Jaap van Wingerde
Stefan Behnel wrote: Omschrijving = Omschrijving.replace(priv?, 'privé') I Thank you, this works now, but I get a new error message. import codecs file = postbank.csv output = %s.eb % file outfile = codecs.open(output, w, utf_8) Omschrijving = u'priv? assuranti?n' # string from

Re: Uploading big files wit cherrypy

2009-02-21 Thread Aahz
In article 366595b2-226c-48e4-961d-85bd0ce4b...@h16g2000yqj.googlegroups.com, Farsheed Ashouri rodmena@gmail.com wrote: But I couldn't upload files bigger than 100Mb. Why and what is workaround? What happens when you upload a file larger than 100MB? -- Aahz (a...@pythoncraft.com)

Re: Byte type?

2009-02-21 Thread Steve Holden
John Nagle wrote: Steve Holden wrote: John Nagle wrote: Benjamin Kaplan wrote: On Sun, Feb 15, 2009 at 11:57 AM, John Nagle na...@animats.com wrote: ...Re bytes not behaving as documented in 2.6: That's indeed how Python 2.6 works. But that's not how PEP 3137 says it's supposed to

Re: ordinal not in range

2009-02-21 Thread Stefan Behnel
Jaap van Wingerde wrote: Stefan Behnel wrote: Omschrijving = Omschrijving.replace(priv?, 'privé') actually, make that Omschrijving = Omschrijving.replace(upriv?, u'privé') (mind the u...) import codecs file = postbank.csv output = %s.eb % file outfile =

Re: Change in cgi handling of POST requests

2009-02-21 Thread Aahz
[posted e-mailed] In article e230c5e2-1d7c-4258-8cc0-d78da6304...@13g2000yql.googlegroups.com, Mac bob.u...@gmail.com wrote: We just upgraded Python to 2.6 on some of our servers and a number of our CGI scripts broke because the cgi module has changed the way it handles POST requests. When

Python C-API Object Allocation

2009-02-21 Thread William Newbery
Ive been learning the C-API lately so I can write python extensions for some of my c++ stuff. I want to use the new and delete operators for creating and destroying my objects. The problem is python seems to break it into several stages. tp_new, tp_init and tp_alloc for creation and tp_del,

Re: TypeError: descriptor 'replace' requires a 'str' object but received a 'unicode'

2009-02-21 Thread Steve Holden
Jaap van Wingerde wrote: # -*- coding: utf_8 -*- Omschrijving = u'priv? assuranti?n' # string from a bank.csv Omschrijving = str.replace(Omschrijving, priv?, 'privé') Omschrijving = str.replace(Omschrijving, Assuranti?n, 'Assurantiën') print Omschrijving When I run this script I get the

Re: ordinal not in range

2009-02-21 Thread Jaap van Wingerde
Stefan Behnel wrote: Omschrijving = Omschrijving.replace(upriv?, u'privé') (mind the u...) outfile = codecs.open(output, wb, encoding=UTF-8) (mind the wb for 'write binary/bytes') It works now! Looks like you'd be happier with Python 3.0, BTW... Python 3 is not in Debian

Re: how to assert that method accepts specific types

2009-02-21 Thread Scott David Daniels
Rhodri James wrote: On Sat, 21 Feb 2009 01:12:01 -, Darren Dale dsdal...@gmail.com wrote: I would like to assert that a method accepts certain types from functools import wraps def accepts(*types): def check_accepts(f): ... class Test(object): @accepts(int)

Re: Byte type?

2009-02-21 Thread John Nagle
Steve Holden wrote: John Nagle wrote: Steve Holden wrote: John Nagle wrote: Benjamin Kaplan wrote: On Sun, Feb 15, 2009 at 11:57 AM, John Nagle na...@animats.com wrote: ...Re bytes not behaving as documented in 2.6: That's indeed how Python 2.6 works. But that's not how PEP 3137 says

Re: Find the location of a loaded module

2009-02-21 Thread rdmurray
Gabriel Genellina gagsl-...@yahoo.com.ar wrote: En Fri, 20 Feb 2009 20:44:21 -0200, Aaron Scott aaron.hildebra...@gmail.com escribi=F3: So, the problem lies with how Python cached the modules in memory. Yes, the modules were in two different locations and yes, the one that I specified

Re: Wanted: Online Python Course for Credit

2009-02-21 Thread Scott David Daniels
jsidell wrote: I'm a high school game development teacher and I have recently discovered Python to be a great way to introduce computer programming. I intend to study Python on my own but I can get professional development credit at my job for taking a Python course. So I'm looking for an

Re: To unicode or not to unicode

2009-02-21 Thread Ross Ridge
=?UTF-8?B?Ik1hcnRpbiB2LiBMw7Z3aXMi?= mar...@v.loewis.de wrote: I don't think that was the complaint. Instead, the complaint was that the OP's original message did not have a Content-type header, and that it was thus impossible to tell what the byte in front of Wiki meant. To properly post either

Re: Byte type?

2009-02-21 Thread Christian Heimes
John Nagle wrote If bytes, a new keyword, works differently in 2.6 and 3.0, that was really dumb. There's no old code using bytes. So converting code to 2.6 means it has to be converted AGAIN for 3.0. That's a good reason to ignore 2.6 as defective. Please don't call something dumb

Re: python contextmanagers and ruby blocks

2009-02-21 Thread Aahz
In article aac004f8-2077-4e53-a865-47c24f7f5...@t3g2000yqa.googlegroups.com, Alia K alia_kho...@yahoo.com wrote: Nevertheless, I remain curious about whether once can use the contextmanager in python to achieve the full power of ruby's blocks... Short answer: no Longer answer: the way in

Re: can multi-core improve single funciton?

2009-02-21 Thread Aahz
In article hfwdntzvr8unnwlunz2dnuvz_uown...@posted.visi, Grant Edwards inva...@invalid wrote: On 2009-02-20, Aahz a...@pythoncraft.com wrote: Steven D'Aprano ste...@remove.this.cybersource.com.au wrote: As I understand it, there's very little benefit to multi-cores in Python due to the GIL.

Re: What encoding does u'...' syntax use?

2009-02-21 Thread Aahz
In article 499f397c.7030...@v.loewis.de, =?ISO-8859-15?Q?=22Martin_v=2E_L=F6wis=22?= mar...@v.loewis.de wrote: Yes, I know that. But every concrete representation of a unicode string has to have an encoding associated with it, including unicode strings produced by the Python parser when it

Re: To unicode or not to unicode

2009-02-21 Thread Thorsten Kampe
* Ross Ridge (Sat, 21 Feb 2009 12:22:36 -0500) =?UTF-8?B?Ik1hcnRpbiB2LiBMw7Z3aXMi?= mar...@v.loewis.de wrote: I don't think that was the complaint. Instead, the complaint was that the OP's original message did not have a Content-type header, and that it was thus impossible to tell what the

Re: What encoding does u'...' syntax use?

2009-02-21 Thread Thorsten Kampe
* Martin v. Löwis (Sat, 21 Feb 2009 00:15:08 +0100) Yes, I know that. But every concrete representation of a unicode string has to have an encoding associated with it, including unicode strings produced by the Python parser when it parses the ascii string u'\xb5' My question is: what

Ctypes debug of dll function

2009-02-21 Thread Massi
Hi everyone, I'm pretty new to the ctypes module and I'm encountering a problem. I'm working under windows xp with python 2.5 and in my script I use ctypes to call from a dll some functions I wrote in C. When I call one of these functions it happens that my script crashes raising the following

Re: Byte type?

2009-02-21 Thread Benjamin Kaplan
On Sat, Feb 21, 2009 at 12:21 PM, John Nagle na...@animats.com wrote: Steve Holden wrote: John Nagle wrote: Steve Holden wrote: John Nagle wrote: Benjamin Kaplan wrote: On Sun, Feb 15, 2009 at 11:57 AM, John Nagle na...@animats.com wrote: ...Re bytes not behaving as documented in

Re: Change in cgi handling of POST requests

2009-02-21 Thread Bob Kline
Aahz wrote: Interesting. Nobody has responded, so I suggest first filing a report using bugs.python.org and then asking on python-dev (with reference to your report). http://bugs.python.org/issue5340 Cheers, Bob -- http://mail.python.org/mailman/listinfo/python-list

Re: What encoding does u'...' syntax use?

2009-02-21 Thread Denis Kasak
On Sat, Feb 21, 2009 at 7:24 PM, Thorsten Kampe thors...@thorstenkampe.de wrote: I'm pretty much sure it is UCS-2 or UCS-4. (Yes, I know there is only a slight difference to UTF-16/UTF-32). I wouldn't call the difference that slight, especially between UTF-16 and UCS-2, since the former can

Re: To unicode or not to unicode

2009-02-21 Thread Ross Ridge
Thorsten Kampe thors...@thorstenkampe.de wrote: RFC 1036 doesn't require nor give a meaning to a Content-Type header in a Usenet message Well, /maybe/ the reason for that is that RFC 1036 was written in 1987 and the first MIME RFC in 1992...? Obviously. Son of RFC 1036 mentions MIME more

Re: What encoding does u'...' syntax use?

2009-02-21 Thread Martin v. Löwis
My question is: what is that encoding? The internal representation is either UTF-16, or UTF-32; which one is a compile-time choice (i.e. when the Python interpreter is built). Wait, I thought it was UCS-2 or UCS-4? Or am I misremembering the countless threads about the distinction between

Re: What encoding does u'...' syntax use?

2009-02-21 Thread Martin v. Löwis
I'm pretty much sure it is UCS-2 or UCS-4. (Yes, I know there is only a slight difference to UTF-16/UTF-32). I wouldn't call the difference that slight, especially between UTF-16 and UCS-2, since the former can encode all Unicode code points, while the latter can only encode those in the

Re: `high overhead of multiple Python processes' (was: Will multithreading make python less popular?)

2009-02-21 Thread Joshua Judson Rosen
Paul Rubin http://phr...@nospam.invalid writes: Right, that's basically the issue here: the cost of using multiple Python processes is unnecessarily high. If that cost were lower then we could more easily use multiple cores to make oru apps faster. What cost is that? At least on unix

Re: What encoding does u'...' syntax use?

2009-02-21 Thread Denis Kasak
On Sat, Feb 21, 2009 at 9:10 PM, Martin v. Löwis mar...@v.loewis.de wrote: I'm pretty much sure it is UCS-2 or UCS-4. (Yes, I know there is only a slight difference to UTF-16/UTF-32). I wouldn't call the difference that slight, especially between UTF-16 and UCS-2, since the former can encode

urllib2 login help

2009-02-21 Thread john . weatherwax
Hello, I'm having trouble using urllib2 (maybe) when trying to log into a web site that requires a user to enter a login name and a password (authentication). I've tried many things but none seem to work and have become stuck recently and was hoping to get a hint from those much more

Re: urllib2 login help

2009-02-21 Thread Stephen Hansen
*ANY* hints/suggestions/directions would be very appreciated since I've run out of ideas of things to try at this point. The last time I heard something like this, I suggested that the problem might be cookies -- and it ended up working for the person I believe.

Re: What encoding does u'...' syntax use?

2009-02-21 Thread Adam Olsen
On Feb 21, 10:48 am, a...@pythoncraft.com (Aahz) wrote: In article 499f397c.7030...@v.loewis.de, =?ISO-8859-15?Q?=22Martin_v=2E_L=F6wis=22?=  mar...@v.loewis.de wrote: Yes, I know that.  But every concrete representation of a unicode string has to have an encoding associated with it,

Re: What encoding does u'...' syntax use?

2009-02-21 Thread Martin v. Löwis
Indeed. As Python *can* encode all characters even in 2-byte mode (since PEP 261), it seems clear that Python's Unicode representation is *not* strictly UCS-2 anymore. Since we're already discussing this, I'm curious - why was UCS-2 chosen over plain UTF-16 or UTF-8 in the first place for

Re: What encoding does u'...' syntax use?

2009-02-21 Thread Denis Kasak
On Sat, Feb 21, 2009 at 9:45 PM, Martin v. Löwis mar...@v.loewis.de wrote: Indeed. As Python *can* encode all characters even in 2-byte mode (since PEP 261), it seems clear that Python's Unicode representation is *not* strictly UCS-2 anymore. Since we're already discussing this, I'm curious -

Re: To unicode or not to unicode

2009-02-21 Thread Thorsten Kampe
* Ross Ridge (Sat, 21 Feb 2009 14:52:09 -0500) Thorsten Kampe thors...@thorstenkampe.de wrote: It's all about declaring your charset. In Python as well as in your newsreader. If you don't declare your charset it's ASCII for you - in Python as well as in your newsreader. Except in practice

Re: Pythonic way to determine if one char of many in a string

2009-02-21 Thread odeits
On Feb 21, 12:47 am, Gabriel Genellina gagsl-...@yahoo.com.ar wrote: En Sat, 21 Feb 2009 01:14:02 -0200, odeits ode...@gmail.com escribió: On Feb 15, 11:31 pm, odeits ode...@gmail.com wrote: It seems what you are actually testing for is if the intersection of the two sets is not empty

Re: python contextmanagers and ruby blocks

2009-02-21 Thread Alia K
Aahz wrote: Longer answer: the way in Python to achieve the full power of Ruby blocks is to write a function. You are most likely right... there is probably no need to introduce ruby-like blocks to python where iteration comes naturally with list comprehensions and generators. But for the

Re: `high overhead of multiple Python processes' (was: Will multithreading make python less popular?)

2009-02-21 Thread Paul Rubin
Joshua Judson Rosen roz...@geekspace.com writes: Right, that's basically the issue here: the cost of using multiple Python processes is unnecessarily high. What cost is that? The cost of messing with the multiprocessing module instead of having threads work properly, and the overhead of

Re: To unicode or not to unicode

2009-02-21 Thread Ross Ridge
Ross Ridge (Sat, 21 Feb 2009 14:52:09 -0500) Except in practice unlike Python, many newsreaders don't assume ASCII. Thorsten Kampe thors...@thorstenkampe.de wrote: They assume ASCII - unless you declare your charset (the exception being Outlook Express and a few Windows newsreaders).

Re: To unicode or not to unicode

2009-02-21 Thread Carl Banks
On Feb 19, 6:57 pm, Ron Garret rnospa...@flownet.com wrote: I'm writing a little wiki that I call µWiki.  That's a lowercase Greek mu at the beginning (it's pronounced micro-wiki).  It's working, except that I can't actually enter the name of the wiki into the wiki itself because the default

Re: Pythonic way to determine if one char of many in a string

2009-02-21 Thread rdmurray
odeits ode...@gmail.com wrote: On Feb 21, 12:47=A0am, Gabriel Genellina gagsl-...@yahoo.com.ar wrote: En Sat, 21 Feb 2009 01:14:02 -0200, odeits ode...@gmail.com escribi=F3: On Feb 15, 11:31=A0pm, odeits ode...@gmail.com wrote: It seems what you are actually testing for is if the

datetime.time and midnight

2009-02-21 Thread Ethan Furman
Greetings, List! I was curious if anyone knew the rationale behind making midnight False? -- import datetime -- midnight = datetime.time(0,0,0) -- bool(midnight) False To my way of thinking, midnight does actually exist so it should be true. If datetime.time was measuring an *amount* of

Re: To unicode or not to unicode

2009-02-21 Thread Thorsten Kampe
* Ross Ridge (Sat, 21 Feb 2009 17:07:35 -0500) The link demonstrates that Google Groups doesn't assume ASCII like Python does. Since popular newsreaders like Google Groups and Outlook Express can display the message correctly without the MIME headers, but your obscure one can't, there's a

Re: To unicode or not to unicode

2009-02-21 Thread Ross Ridge
Ross Ridge (Sat, 21 Feb 2009 17:07:35 -0500) The link demonstrates that Google Groups doesn't assume ASCII like Python does. Since popular newsreaders like Google Groups and Outlook Express can display the message correctly without the MIME headers, but your obscure one can't, there's a much

Re: zlib interface semi-broken

2009-02-21 Thread Aahz
In article mailman.9414.1234459585.3487.python-l...@python.org, Travis travis+ml-pyt...@subspacefield.org wrote: So I've submitted a patch to bugs.python.org to add a new member called is_finished to the zlib decompression object. Issue 5210, file 13056, msg 81780 You may also want to bring

Re: To unicode or not to unicode

2009-02-21 Thread Thorsten Kampe
* Ross Ridge (Sat, 21 Feb 2009 18:06:35 -0500) The link demonstrates that Google Groups doesn't assume ASCII like Python does. Since popular newsreaders like Google Groups and Outlook Express can display the message correctly without the MIME headers, but your obscure one can't, there's a

Re: datetime.time and midnight

2009-02-21 Thread MRAB
Ethan Furman wrote: Greetings, List! I was curious if anyone knew the rationale behind making midnight False? -- import datetime -- midnight = datetime.time(0,0,0) -- bool(midnight) False To my way of thinking, midnight does actually exist so it should be true. If datetime.time was

Re: multiprocessing module and os.close(sys.stdin.fileno())

2009-02-21 Thread Graham Dumpleton
On Feb 21, 4:20 pm, Joshua Judson Rosen roz...@geekspace.com wrote: Jesse Noller jnol...@gmail.com writes: On Tue, Feb 17, 2009 at 10:34 PM, Graham Dumpleton graham.dumple...@gmail.com wrote: Why is the multiprocessing module, ie., multiprocessing/process.py, in _bootstrap() doing:

Re: To unicode or not to unicode

2009-02-21 Thread Ross Ridge
Ross Ridge (Sat, 21 Feb 2009 18:06:35 -0500) I understand what Unicode and MIME are for and why they exist. Neither their merits nor your insults change the fact that the only current standard governing the content of Usenet posts doesn't require their use. Thorsten Kampe

Re: Pythonic way to determine if one char of many in a string

2009-02-21 Thread odeits
On Feb 21, 2:24 pm, rdmur...@bitdance.com wrote: odeits ode...@gmail.com wrote: On Feb 21, 12:47=A0am, Gabriel Genellina gagsl-...@yahoo.com.ar wrote: En Sat, 21 Feb 2009 01:14:02 -0200, odeits ode...@gmail.com escribi=F3: On Feb 15, 11:31=A0pm, odeits ode...@gmail.com wrote: It

Re: To unicode or not to unicode

2009-02-21 Thread Thorsten Kampe
* Ross Ridge (Sat, 21 Feb 2009 19:39:42 -0500) Thorsten Kampe thors...@thorstenkampe.de wrote: That's right. As long as you use pure ASCII you can skip this nasty step of informing other people which charset you are using. If you do use non ASCII then you have to do that. That's the way

Re: Using clock() in threading on Windows

2009-02-21 Thread David Bolen
Martin v. Löwis mar...@v.loewis.de writes: As a consequence, the half-busy loops could go away, at least on systems where lock timeouts can be given to the system. I know that in some cases in the past I've had to bypass a Queue's use of threading objects for waiting for a queue to unblock

Re: multiprocessing module and os.close(sys.stdin.fileno())

2009-02-21 Thread Joshua Judson Rosen
Graham Dumpleton graham.dumple...@gmail.com writes: On Feb 21, 4:20 pm, Joshua Judson Rosen roz...@geekspace.com wrote: Jesse Noller jnol...@gmail.com writes: On Tue, Feb 17, 2009 at 10:34 PM, Graham Dumpleton graham.dumple...@gmail.com wrote: Why is the multiprocessing module,

Re: Python dictionary size/entry limit?

2009-02-21 Thread Sean
Stefan Behnel wrote: intellimi...@gmail.com wrote: You may be better served with one of the dbm databases that come with Python. They live on-disk but do the usual in-memory caching. They'll likely perform a lot better than your OS level swap file. Stefan the bsddb module has the feature that

Re: count secton of data in list

2009-02-21 Thread odeits
On Feb 20, 3:45 pm, Emile van Sebille em...@fenx.com wrote: brianrpsgt1 wrote: def step1(val):        data2_row = []     for d1r in data1_row:         if d1r[1] = val:             switch = 0             data2_row = d1r[0],d1r[1],d1r[2],switch                

Re: Wanted: Online Python Course for Credit

2009-02-21 Thread Steve Holden
Scott David Daniels wrote: jsidell wrote: I'm a high school game development teacher and I have recently discovered Python to be a great way to introduce computer programming. I intend to study Python on my own but I can get professional development credit at my job for taking a Python

Re: To unicode or not to unicode

2009-02-21 Thread Steve Holden
Thorsten Kampe wrote: * Ross Ridge (Sat, 21 Feb 2009 14:52:09 -0500) Thorsten Kampe thors...@thorstenkampe.de wrote: It's all about declaring your charset. In Python as well as in your newsreader. If you don't declare your charset it's ASCII for you - in Python as well as in your newsreader.

Re: To unicode or not to unicode

2009-02-21 Thread Martin v. Löwis
Since when is Google Groups a newsreader? So far as I know, all the display/formatting is handled by my web browser and GG merely stuffs messages into an HTML wrapper... It also transmits this HTML wrapper via HTTP, where it claims that the charset of the HTML is UTF-8. To do that, it

Python 3 and easygui problem

2009-02-21 Thread Peter Anderson
I have just installed Python 3. I have been using Tkinter and easygui (with Python 2.5.4) for any GUI needs. I have just started to port some of my existing scripts to Python 3 and discovered problems with easygui. I was using the following script for testing: from easygui import * import sys

Re: Python 3 and easygui problem

2009-02-21 Thread Chris Rebert
On Sat, Feb 21, 2009 at 8:46 PM, Peter Anderson peter.ander...@internode.on.net wrote: I have just installed Python 3. I have been using Tkinter and easygui (with Python 2.5.4) for any GUI needs. I have just started to port some of my existing scripts to Python 3 and discovered problems with

Re: To unicode or not to unicode

2009-02-21 Thread Joshua Judson Rosen
Ross Ridge rri...@csclub.uwaterloo.ca writes: It's all about declaring your charset. In Python as well as in your newsreader. If you don't declare your charset it's ASCII for you - in Python as well as in your newsreader. Except in practice unlike Python, many newsreaders don't assume

Re: multiprocessing module and os.close(sys.stdin.fileno())

2009-02-21 Thread Graham Dumpleton
On Feb 22, 12:52 pm, Joshua Judson Rosen roz...@geekspace.com wrote: Graham Dumpleton graham.dumple...@gmail.com writes: On Feb 21, 4:20 pm, Joshua Judson Rosen roz...@geekspace.com wrote: Jesse Noller jnol...@gmail.com writes: On Tue, Feb 17, 2009 at 10:34 PM, Graham Dumpleton

Re: datetime.time and midnight

2009-02-21 Thread Paddy3118
On Feb 21, 10:44 pm, Ethan Furman et...@stoneleaf.us wrote: Greetings, List! I was curious if anyone knew the rationale behind making midnight False? -- import datetime -- midnight = datetime.time(0,0,0) -- bool(midnight) False To my way of thinking, midnight does actually exist so it

Problem trying to install ReportLab with easy_install

2009-02-21 Thread Sebastian Bassi
I don't understand what is wrong when I try to install ReportLab. This is under Ubuntu and all build packages are installed. Here is what I get when trying to install it: (I could install it with apt-get, but I am testing virtualenv and easy_install).

Re: Find the location of a loaded module

2009-02-21 Thread Gabriel Genellina
En Sat, 21 Feb 2009 14:51:40 -0200, rdmur...@bitdance.com escribió: Gabriel Genellina gagsl-...@yahoo.com.ar wrote: En Fri, 20 Feb 2009 20:44:21 -0200, Aaron Scott aaron.hildebra...@gmail.com escribi=F3: So, the problem lies with how Python cached the modules in memory. Yes, the modules

Re: datetime.time and midnight

2009-02-21 Thread Steven D'Aprano
Paddy3118 wrote: Ethan, Knights are true and seek the light. Evil trolls seek the night and so their hour is false. ;-) That's speciest *and* lightist. There's nothing wrong with avoiding the evil burning day star, that's practically de rigour for programmers. *wink* -- Steven --

Re: Python dictionary size/entry limit?

2009-02-21 Thread intelliminer
On Feb 21, 6:47 pm, Stefan Behnel stefan...@behnel.de wrote: intellimi...@gmail.com wrote: I wrote a script to process textual data and extract phrases from them, storing these phrases in a dictionary. It encounters a MemoryError when there are about 11.18M keys in the dictionary, and the

Re: datetime.time and midnight

2009-02-21 Thread Gabriel Genellina
En Sat, 21 Feb 2009 21:55:23 -0200, MRAB goo...@mrabarnett.plus.com escribió: Ethan Furman wrote: Greetings, List! I was curious if anyone knew the rationale behind making midnight False? -- import datetime -- midnight = datetime.time(0,0,0) -- bool(midnight) False To my way of

Re: Python 3 and easygui problem

2009-02-21 Thread Gabriel Genellina
En Sun, 22 Feb 2009 03:05:51 -0200, Chris Rebert c...@rebertia.com escribió: On Sat, Feb 21, 2009 at 8:46 PM, Peter Anderson peter.ander...@internode.on.net wrote: I have just installed Python 3. I have been using Tkinter and easygui (with Python 2.5.4) for any GUI needs. I have just

[issue5336] collections.namedtuple generates code causing PyChecker warnings

2009-02-21 Thread Mikhail Bessonov
New submission from Mikhail Bessonov za...@mail.ru: The first argument of some methods generated by collections.namedtuple differs from 'self'. It upsets a number of code checkers, notably PyChecker, because in most cases it is indeed an error. As a result, the code using

[issue4258] Use 30-bit digits instead of 15-bit digits for Python integers.

2009-02-21 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Adding Tim Peters to the nosy list, mainly to give him an opportunity to throw up his hands in horror at my rewrite of his (I'm guessing) implementation of division. -- nosy: +tim_one ___ Python

[issue5163] tkinter.scrolledtext: new text is hidden after using insert()

2009-02-21 Thread Guilherme Polo
Guilherme Polo ggp...@gmail.com added the comment: In this case I'm closing it. -- resolution: - rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5163 ___

[issue5323] document expected/required behavior of 3.x io subsystem with respect to buffering

2009-02-21 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: RDM, all the classes you mentioned should indeed be able to do short reads on pipes, sockets and the like. That's how they are tested in test_io.py: against mock raw i/o classes which only return a few bytes at a time (e.g. only 5 bytes will be

[issue5336] collections.namedtuple generates code causing PyChecker warnings

2009-02-21 Thread Benjamin Peterson
Changes by Benjamin Peterson benja...@python.org: -- assignee: - rhettinger nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5336 ___

[issue5330] profile and cProfile do not report C functions called with keyword arguments

2009-02-21 Thread Hagen Fürstenau
Hagen Fürstenau hfuerste...@gmx.net added the comment: I found the reason for this problem: C function calls with keyword arguments follow a different path than those without keywords in the function call_function of ceval.c. They end up being handled by do_call, but there the call is not

[issue5329] os.popen2 and os.popen3 in python 2.6 incompatible with os.popen* in python 2.5

2009-02-21 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Adding a couple of unit tests would be nice. -- nosy: +pitrou priority: - high versions: +Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5329

[issue5323] document expected/required behavior of 3.x io subsystem with respect to buffering

2009-02-21 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: On Sat, 21 Feb 2009 at 13:14, Antoine Pitrou wrote: Antoine Pitrou pit...@free.fr added the comment: RDM, all the classes you mentioned should indeed be able to do short reads on pipes, sockets and the like. That's how they are tested

[issue5337] Scanner class in re module undocumented

2009-02-21 Thread Michael Foord
New submission from Michael Foord mich...@voidspace.org.uk: There is a useful Scanner class in the re module which is undocumented. See: http://mail.python.org/pipermail/python-dev/2003-April/035075.html http://www.evanfosmark.com/2009/02/sexy-lexing-with-python/ -- assignee:

[issue5308] cannot marshal objects with more than 2**31 elements

2009-02-21 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: It wouldn't hurt to add the overflow checks though, would it? -- assignee: - marketdickinson priority: - normal ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5308

[issue5338] Typo in Python/C API sect 1.2.1

2009-02-21 Thread Ruth Aydt
New submission from Ruth Aydt a...@hdfgroup.org: In Section 1.2.1 of the 2.6.1 Python/C API documentation, I believe there is a typo. First sentence in second paragraph in Reference Count Details subsection. ... function passes it a reference... should be ... function passes in a reference...

[issue5339] Typo in Python/C API Chapter 2

2009-02-21 Thread Ruth Aydt
New submission from Ruth Aydt a...@hdfgroup.org: Python/C API Documentation for 2.6.1 Chapter 2, 3rd paragraph. On particular issue... should be One particular issue... -- assignee: georg.brandl components: Documentation messages: 82572 nosy: aydt, georg.brandl severity: normal status:

[issue5339] Typo in Python/C API Chapter 2

2009-02-21 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Thanks, fixed in r69840. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5339 ___

[issue5338] Typo in Python/C API sect 1.2.1

2009-02-21 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Thanks, fixed in r69840. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5338 ___

[issue5340] Change in cgi behavior breaks existing software

2009-02-21 Thread Bob Kline
New submission from Bob Kline bkl...@rksystems.com: We just upgraded Python to 2.6 on some of our servers and a number of our CGI scripts broke because the cgi module has changed the way it handles POST requests. When the 'action' attribute was not present in the form element on an HTML page

[issue4565] Rewrite the IO stack in C

2009-02-21 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: The StringIO rewrite is finished now. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4565 ___ ___

[issue5341] A selection of spelling errors and typos throughout source

2009-02-21 Thread Mark Dickinson
New submission from Mark Dickinson dicki...@gmail.com: Here's a patch that represents the result of grepping through the source for some of my favo(u)rite spelling errors. Georg, I reali(z/s)e that most of these fixes are outside the Doc/ directory, but are you interested in taking a look at

  1   2   >