Re: Spreadsheet-style dependency tracking

2010-10-20 Thread Carl Banks
On Oct 19, 8:59 pm, Lawrence D'Oliveiro l...@geek- central.gen.new_zealand wrote: In message eeb52362-1308-4c3f-85a2-7493f796a...@g18g2000yqk.googlegroups.com, Carl Banks wrote: On Oct 18, 4:15 pm, Lawrence D'Oliveiro l...@geek-central.gen.new_zealand wrote: In message

Re: OO and game design questions

2010-10-20 Thread dex
On Oct 19, 8:08 pm, Carl Banks pavlovevide...@gmail.com wrote: On Oct 19, 1:19 am, dex josipmisko...@gmail.com wrote: I'm not sure if it's a good idea to let an item disappear from your inventory by a weak reference disappearing.  It seems a little shaky to not know where your

Re: OO and game design questions

2010-10-20 Thread dex
On Oct 19, 6:54 pm, Dennis Lee Bieber wlfr...@ix.netcom.com wrote: On Tue, 19 Oct 2010 01:19:48 -0700 (PDT), dex josipmisko...@gmail.com declaimed the following in gmane.comp.python.general: OK, imagine a MUD, where players can dig out new rooms. Room A has a door that holds reference to

Re: merge list of tuples with list

2010-10-20 Thread Chris Torek
On Wed, Oct 20, 2010 at 1:33 PM, Daniel Wagner brocki2...@googlemail.com wrote: Any more efficient ways or suggestions are still welcome! In article mailman.58.1287547882.2218.python-l...@python.org James Mills prolo...@shortcircuit.net.au wrote: Did you not see Paul Rubin's solution: [x+(y,)

Python debug assertion

2010-10-20 Thread swapnil
Python disables MSCRT assertions for debug mode in the initialization of exceptions module. Does anyone know why? -- http://mail.python.org/mailman/listinfo/python-list

Re: merge list of tuples with list

2010-10-20 Thread Peter Otten
Daniel Wagner wrote: Hello Everyone, I'm new in this group and I hope it is ok to directly ask a question. My short question: I'm searching for a nice way to merge a list of tuples with another tuple or list. Short example: a = [(1,2,3), (4,5,6)] b = (7,8) After the merging I would

Re: Reading Outlook .msg file using Python

2010-10-20 Thread Tim Golden
On 19/10/2010 22:48, John Henry wrote: Looks like this flag is valid only if you are getting messages directly from Outlook. When reading the msg file, the flag is invalid. Same issue when accessing attachments. In addition, the MAPITable method does not seem to work at all when trying to get

Re: ANN: Python-on-a-Chip release 09

2010-10-20 Thread Stefan Behnel
dwhall, 18.10.2010 15:15: Python-on-a-Chip Featuring the PyMite VM === [...] Python-on-a-Chip (p14p) is a project to develop a reduced Python virtual machine (codenamed PyMite) that runs a significant subset of the Python language on microcontrollers without an OS. Do you

Re: OO and game design questions

2010-10-20 Thread Jonathan Hartley
On Oct 18, 8:28 am, dex josipmisko...@gmail.com wrote: I'm building a turn based RPG game as a hobby. The design is becoming increasingly complicated and confusing, and I think I may have tendency to over-engineer simple things. Can anybody please check my problems-solutions and point me to

Re: OO and game design questions

2010-10-20 Thread Jonathan Hartley
On Oct 20, 11:25 am, Jonathan Hartley tart...@tartley.com wrote: On Oct 18, 8:28 am, dex josipmisko...@gmail.com wrote: I'm building a turn based RPG game as a hobby. The design is becoming increasingly complicated and confusing, and I think I may have tendency to over-engineer simple

Re: pylint -- should I just ignore it sometimes?

2010-10-20 Thread Jean-Michel Pichavant
Seebs wrote: On 2010-10-19, Martin P. Hellwig martin.hell...@dcuktec.org wrote: Speaking without context here, so take it with as much salt as required ;-), it is not that unusual. However there are some things to consider, for example are all these attributes related to each other? If so

Re: OO and game design questions

2010-10-20 Thread dex
On Oct 20, 12:25 pm, Jonathan Hartley tart...@tartley.com wrote: On Oct 18, 8:28 am, dex josipmisko...@gmail.com wrote: I'm building a turn based RPG game as a hobby. The design is becoming increasingly complicated and confusing, and I think I may have tendency to over-engineer simple

how to name a function in a comp lang (design)

2010-10-20 Thread Xah Lee
A great piece about terminology in computer languages. * 〈The Poetry of Function Naming〉 (2010-10-18) By Stephen Wolfram. At: http://blog.stephenwolfram.com/2010/10/the-poetry-of-function-naming/ See also: • 〈The Importance of Terminology's Quality In Computer Languages〉

Re: Windows: getting notification about power state changes

2010-10-20 Thread Gelonida
Hi Tim, Thanks a lot. I'll look into it. On 10/19/2010 11:30 AM, Tim Golden wrote: On 19/10/2010 10:06, Gelonida wrote: I'd like to be notified about certain events and call certain python functions depending on the event. call a function: - before (or after) the screen saver kicks in . .

Re: Python3: Is this a bug in urllib?

2010-10-20 Thread Peter Otten
Johannes Bauer wrote: Hi, I've experienced the following behavior with Python3 of which I do not know if it's a bug or not. On two Python3.1 implementations, Python's urllib hangs when encountering a HTTP 301 (Redirect). The code to reproduce is a one-liner (actually, two-liner), Python

Re: how to name a function in a comp lang (design)

2010-10-20 Thread Marc Mientki
Am 20.10.2010 13:14, schrieb Xah Lee: See also: • 〈The Importance of Terminology's Quality In Computer Languages〉 http://xahlee.org/UnixResource_dir/writ/naming_functions.html where i gave some examples of the naming. Xah ∑ http://xahlee.org/ ☄ I'd like to introduce a blog post by

Re: how to name a function in a comp lang (design)

2010-10-20 Thread Xah Lee
On Oct 20, 4:52 am, Marc Mientki mien...@nonet.com wrote: Am 20.10.2010 13:14, schrieb Xah Lee: See also: • 〈The Importance of Terminology's Quality In Computer Languages〉 http://xahlee.org/UnixResource_dir/writ/naming_functions.html where i gave some examples of the naming.    I'd

Re: how to name a function in a comp lang (design)

2010-10-20 Thread Marc Mientki
Am 20.10.2010 14:07, schrieb Xah Lee: On Oct 20, 4:52 am, Marc Mientkimien...@nonet.com wrote: Am 20.10.2010 13:14, schrieb Xah Lee: See also: • 〈The Importance of Terminology's Quality In Computer Languages〉 http://xahlee.org/UnixResource_dir/writ/naming_functions.html where i gave

Re: Python3: Is this a bug in urllib?

2010-10-20 Thread Justin Ezequiel
On Oct 20, 12:47 am, Johannes Bauer dfnsonfsdu...@gmx.de wrote: from urllib import request; request.URLopener().open(http://google.de;) aren't you supposed to call read on the return value of open? i.e., request.URLopener().open(http://google.de;).read() --

Re: Unicode questions

2010-10-20 Thread M.-A. Lemburg
Tobiah wrote: I've been reading about the Unicode today. I'm only vaguely understanding what it is and how it works. Please correct my understanding where it is lacking. Unicode is really just a database of character information such as the name, unicode section, possible numeric value

exception during module initialization + python3

2010-10-20 Thread Neal Becker
Has behavior of exception thrown during module initialization changed with python3? using boost::python, throwing a c++ exception in module initialization, I get: SystemError: initialization of ldpc_45 raised unreported exception I exepected to see the string associated with exception, which

Re: overriding a property

2010-10-20 Thread Lucasm
On 19 Okt, 16:07, Benjamin Peterson benja...@python.org wrote: Lucasm lordlucraft at gmail.com writes: I would like to override the property for an instance of A to say the string 'bla'. A.return_five = blah I guess you did not test that. :) --

Re: overriding a property

2010-10-20 Thread Lucasm
On 19 Okt, 18:28, Steven D'Aprano st...@remove-this- cybersource.com.au wrote: On Tue, 19 Oct 2010 06:39:56 -0700, Lucasm wrote: Hi, A question. Is it possible to dynamically override a property? class A(object):     @property     def return_five(self):         return 5 I would

Re: annoying CL echo in interactive python / ipython

2010-10-20 Thread kj
In mailman.29.1287515736.2218.python-l...@python.org Jed Smith j...@jedsmith.org writes: On Tue, Oct 19, 2010 at 2:35 PM, kj no.em...@please.post wrote: In mailman.24.1287510296.2218.python-l...@python.org Jed Smith j...@jed= smith.org writes: On Tue, Oct 19, 2010 at 1:37 PM, kj

Re: overriding a property

2010-10-20 Thread Peter Otten
Lucasm wrote: On 19 Okt, 18:28, Steven D'Aprano st...@remove-this- cybersource.com.au wrote: On Tue, 19 Oct 2010 06:39:56 -0700, Lucasm wrote: Hi, A question. Is it possible to dynamically override a property? class A(object): @property def return_five(self): return 5 I would

Re: overriding a property

2010-10-20 Thread Lucasm
On 20 Okt, 16:09, Peter Otten __pete...@web.de wrote: Lucasm wrote: On 19 Okt, 18:28, Steven D'Aprano st...@remove-this- cybersource.com.au wrote: On Tue, 19 Oct 2010 06:39:56 -0700, Lucasm wrote: Hi, A question. Is it possible to dynamically override a property? class A(object):

Re: overriding a property

2010-10-20 Thread John Posner
On 10/20/2010 9:59 AM, Lucasm wrote: snip Thanks for the answers. I would like to override the property though without making special modifications in the main class beforehand. Is this possible? Take a look at http://docs.python.org/reference/datamodel.html#descriptors The last paragraph

Re: Print to an IPP printer (pkipplib?)

2010-10-20 Thread Martin Gregorie
On Fri, 15 Oct 2010 15:28:10 -0400, Adam Tauno Williams wrote: I've found the module pkipplib which seems to work well for things like interrogating an IPP (CUPS) server. But is there a way to send a print job to an IPP print queue? [and no, the local system knows nothing about the print

Tkinter (and IDLE) window docking? effect when dragging root window to edge of display

2010-10-20 Thread python
Python 2.6/2.7 (32-bit) for Windows: When I drag a Tkinter root window to the left, upper, or right edge of my display ... as soon as my mouse cursor hits the visible edge of the display ... as if I'm trying to dock the window on the edge in question ... a giant phantom Tkinter window pops up

Re: overriding a property

2010-10-20 Thread Hrvoje Niksic
Lucasm lordlucr...@gmail.com writes: Thanks for the answers. I would like to override the property though without making special modifications in the main class beforehand. Is this possible? That will not be easy. When you access obj.return_five, python looks up 'return_five' in type(obj) to

Re: Reading Outlook .msg file using Python

2010-10-20 Thread John Henry
On Oct 20, 1:41 am, Tim Golden m...@timgolden.me.uk wrote: On 19/10/2010 22:48, John Henry wrote: Looks like this flag is valid only if you are getting messages directly from Outlook.  When reading the msg file, the flag is invalid. Same issue when accessing attachments.  In addition,

python shell silently ignores termios.tcsetattr()

2010-10-20 Thread kj
This post is a continuation of an earlier thread called annoying CL echo in interactive python / ipython I found some more clues to the problem, although no solution yet. First, I found a post from 2009.05.09 that describes exactly the same situation I've observed (although it got no

Re: Reading Outlook .msg file using Python

2010-10-20 Thread John Henry
On Oct 20, 9:01 am, John Henry john106he...@hotmail.com wrote: On Oct 20, 1:41 am, Tim Golden m...@timgolden.me.uk wrote: On 19/10/2010 22:48, John Henry wrote: Looks like this flag is valid only if you are getting messages directly from Outlook.  When reading the msg file, the flag

Unix-head needs to Windows-ize his Python script

2010-10-20 Thread gb345
I have a handy Python script, which takes a few command-line arguments, and accepts a few options. I developed it on Unix, with very much of a Unix-mindset. Some Windows-using colleagues have asked me to make the script easy to use under Windows 7. I.e.: no command-line. Therefore, I want

Re: Tkinter (and IDLE) window docking? effect when dragging root window to edge of display

2010-10-20 Thread Jerry Hill
On Wed, Oct 20, 2010 at 11:32 AM, pyt...@bdurham.com wrote: Python 2.6/2.7 (32-bit) for Windows: When I drag a Tkinter root window to the left, upper, or right edge of my display ... as soon as my mouse cursor hits the visible edge of the display ... as if I'm trying to dock the window on the

Re: Unix-head needs to Windows-ize his Python script

2010-10-20 Thread Shawn Milochik
Write a small GUI in the easy-to-use and cross-platform wxPython module. All this GUI needs to do is allow them to input the arguments. The code can then import your stand-alone version of the script and execute its code, passing the arguments in. wxPython is just Python. --

Re: pylint -- should I just ignore it sometimes?

2010-10-20 Thread Seebs
On 2010-10-20, Jean-Michel Pichavant jeanmic...@sequans.com wrote: except ValueError, e: Use meaningful names, this is so important. It's important, but meaning can come from idiom, not from the word used. 'e' is not meaningful. Sure it is. It's like i for a loop index. There's a reason

Re: Unix-head needs to Windows-ize his Python script

2010-10-20 Thread Grant Edwards
On 2010-10-20, Shawn Milochik sh...@milochik.com wrote: Write a small GUI in the easy-to-use and cross-platform wxPython module. All this GUI needs to do is allow them to input the arguments. The code can then import your stand-alone version of the script and execute its code, passing the

Re: Tkinter (and IDLE) window docking? effect when dragging root window to edge of display

2010-10-20 Thread python
Jerry, It sounds like you are describing the Aero Snap feature in Windows 7. Bingo! You hit the nail and the head. Thank you very much! Regards, Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Re: Unix-head needs to Windows-ize his Python script

2010-10-20 Thread Shawn Milochik
On Oct 20, 2010, at 2:00 PM, Grant Edwards wrote: On 2010-10-20, Shawn Milochik sh...@milochik.com wrote: ript and execute its code, passing the arguments in. wxPython is just Python. No, it's not. You can't assume that any windows machine with Python installed also has wxPython

Re: Classes in a class: how to access variables from one in another

2010-10-20 Thread Andreas Waldenburger
On 18 Oct 2010 22:29:27 GMT Steven D'Aprano st...@remove-this-cybersource.com.au wrote: On Mon, 18 Oct 2010 09:34:07 -0700, Chris Rebert wrote: Also, Python's scoping rules, particularly for class-level scopes, don't work the way programmers from languages where nested classes are common

Re: Unix-head needs to Windows-ize his Python script

2010-10-20 Thread Grant Edwards
On 2010-10-20, Shawn Milochik sh...@milochik.com wrote: On Oct 20, 2010, at 2:00 PM, Grant Edwards wrote: On 2010-10-20, Shawn Milochik sh...@milochik.com wrote: ript and execute its code, passing the arguments in. wxPython is just Python. No, it's not. You can't assume that any

Re: Script to capture stderr of subprocess

2010-10-20 Thread Nobody
On Tue, 19 Oct 2010 11:21:49 -0700, jslow...@gmail.com wrote: Actually, if it was possible, it would be nice to capture all the bytes going between stdin and stdout in a file as well for debugging purposes. If the child process expects to be running on a terminal, you would need to use a

Re: pylint -- should I just ignore it sometimes?

2010-10-20 Thread Steven D'Aprano
On Wed, 20 Oct 2010 12:47:02 +0200, Jean-Michel Pichavant wrote: except ValueError, e: Use meaningful names, this is so important. 'e' is not meaningful. 'exception' would be slighly better. While I agree with everything else you had to say, I have to take exception to this comment [pun

socket.sendto / UDP problem

2010-10-20 Thread Todd Walter
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello, When transmitting via UDP to a PLC, I run into a strange problem where socket.sendto returns double the number of characters sent in the datagram. I thought this was an error and used Wireshark to sniff the connection and discovered that it

Re: Unix-head needs to Windows-ize his Python script

2010-10-20 Thread Urpo T. Koira
On 2010-10-20, Grant Edwards inva...@invalid.invalid wrote: On 2010-10-20, Shawn Milochik sh...@milochik.com wrote: Write a small GUI in the easy-to-use and cross-platform wxPython module. All this GUI needs to do is allow them to input the arguments. The code can then import your stand-alone

Re: Unix-head needs to Windows-ize his Python script

2010-10-20 Thread Grant Edwards
On 2010-10-20, Urpo T. Koira utko...@fuck.spam.gmail.com.invalid wrote: On 2010-10-20, Grant Edwards inva...@invalid.invalid wrote: On 2010-10-20, Shawn Milochik sh...@milochik.com wrote: Write a small GUI in the easy-to-use and cross-platform wxPython module. All this GUI needs to do is

Re: pylint -- should I just ignore it sometimes?

2010-10-20 Thread Matteo Landi
Another situation in which I needed to disable such kind of warnings is while working with graphics modules. I often use variable names such as x, y, z for coordinates, or r,g,b for colors. Would longer names make the reader's life easier? Best regards, Matteo On Wed, Oct 20, 2010 at 9:37 PM,

logging: StreamHandler’s newline terminator now co nfigurable

2010-10-20 Thread Vinay Sajip
When StreamHandler writes a formatted log message to its stream, it adds a newline terminator. This behaviour is inherited by FileHandler and the other classes which derive from it (such as the rotating file handlers). For most people, that’s what they want, since they get log messages on

Re: pylint -- should I just ignore it sometimes?

2010-10-20 Thread Seebs
On 2010-10-20, Matteo Landi landima...@gmail.com wrote: Another situation in which I needed to disable such kind of warnings is while working with graphics modules. I often use variable names such as x, y, z for coordinates, or r,g,b for colors. Would longer names make the reader's life

Re: exception during module initialization + python3

2010-10-20 Thread Neal Becker
Neal Becker wrote: Has behavior of exception thrown during module initialization changed with python3? using boost::python, throwing a c++ exception in module initialization, I get: SystemError: initialization of ldpc_45 raised unreported exception I exepected to see the string

Re: merge list of tuples with list

2010-10-20 Thread Daniel Wagner
Many thanks for all these suggestions! here is a short proof that you guys are absolutely right and my solution is pretty inefficient. One of your ways: $ python /[long_path]/timeit.py 'a=[(1,2,3),(4,5,6)];b=(7,8);[x+(y,) for x,y in zip(a,b)]' 100 loops, best of 3: 1.44 usec per loop And my

Data files with distutils and special paths

2010-10-20 Thread Pablo Recio Quijano
Hi! I was following the documentation about distutils [1] in order to install my application in a python-way. But installing it in /usr/local (following the official doc [2] too) with $ sudo python setup.py install --prefix=/usr/local The data files are created inside the python package, in

Re: pylint -- should I just ignore it sometimes?

2010-10-20 Thread Ben Finney
Seebs usenet-nos...@seebs.net writes: Interesting point. Which is really easier to read: x, y, z = p.nextpoint() xCoordinate, yCoordinate, zCoordinate = polygon.nextPointCoordinates() The latter uses camelCase, so it's horrible right out of the gate :-) -- \ “The

python-imaging-sane

2010-10-20 Thread barronmo
I'm trying to get my application to scan, create a .pdf, and then save it in a patient's folder. I found python-imaging-sane but I can't get things to work correctly. Here is what's happening at the command prompt: import sane sane.init() (16777235, 1, 0, 19) print sane.get_devices()

Re: Unix-head needs to Windows-ize his Python script

2010-10-20 Thread Waldemar Osuch
On Oct 20, 11:38 am, gb345 gb...@invalid.com wrote: I have a handy Python script, which takes a few command-line arguments, and accepts a few options.  I developed it on Unix, with very much of a Unix-mindset.  Some Windows-using colleagues have asked me to make the script easy to use under

Re: socket.sendto / UDP problem

2010-10-20 Thread MRAB
On 20/10/2010 21:20, Todd Walter wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello, When transmitting via UDP to a PLC, I run into a strange problem where socket.sendto returns double the number of characters sent in the datagram. I thought this was an error and used Wireshark to

Re: merge list of tuples with list

2010-10-20 Thread Steven D'Aprano
On Wed, 20 Oct 2010 14:32:53 -0700, Daniel Wagner wrote: I really appreciate your solutions but they bring me to a new question: Why is my solution so inefficient? The same operation without the list/tuple conversion $ python /[long_path]/timeit.py 'a=[[1,2,3], [4,5,6]];b=[7,8];map(lambda

Re: Python3: Is this a bug in urllib?

2010-10-20 Thread Justin Ezequiel
On Oct 20, 8:32 pm, Justin Ezequiel justin.mailingli...@gmail.com wrote: On Oct 20, 12:47 am, Johannes Bauer dfnsonfsdu...@gmx.de wrote: from urllib import request; request.URLopener().open(http://google.de;) aren't you supposed to call read on the return value of open? i.e., .read()

Re: merge list of tuples with list

2010-10-20 Thread Daniel Wagner
[b.pop(0)] This has to lookup the global b, resize it, create a new list, concatenate it with the list x (which creates a new list, not an in-place concatenation) and return that. The amount of work is non-trivial, and I don't think that 3us is unreasonable. I forgot to take account

Re: python shell silently ignores termios.tcsetattr()

2010-10-20 Thread Lawrence D'Oliveiro
In message i9n4ph$d7...@reader1.panix.com, kj wrote: I tried to fix the problem by applying the equivalent of stty -echo within a python interactive session, but discovered that this setting is immediately (and silently) overwritten. That seems reasonable behaviour; the command loop is

Filename for stdout

2010-10-20 Thread Richard Gibbs
If my python script is called with stdout (or stdin or stderr) redirected to a file, how can I find the filename under Linux? Under Windows? Thanks, RG -- http://mail.python.org/mailman/listinfo/python-list

Re: Filename for stdout

2010-10-20 Thread James Mills
On Thu, Oct 21, 2010 at 6:17 AM, Richard Gibbs richard.gi...@smooth-stone.com wrote: If my python script is called with stdout (or stdin or stderr) redirected to a file, how can I find the filename under Linux?  Under Windows? I don't believe there is a way to do this. The shell normally takes

Re: Filename for stdout

2010-10-20 Thread Grant Edwards
On 2010-10-21, James Mills prolo...@shortcircuit.net.au wrote: On Thu, Oct 21, 2010 at 6:17 AM, Richard Gibbs richard.gi...@smooth-stone.com wrote: If my python script is called with stdout (or stdin or stderr) redirected to a file, how can I find the filename under Linux??? Under Windows? I

how to scrutch a dict()

2010-10-20 Thread Phlip
Not Hyp: def _scrunch(**dict): result = {} for key, value in dict.items(): if value is not None: result[key] = value return result That says throw away every item in a dict if the Value is None. Are there any tighter or smarmier ways to do that? Python does so often

Re: how to scrutch a dict()

2010-10-20 Thread Paul Rubin
Phlip phlip2...@gmail.com writes: def _scrunch(**dict): result = {} for key, value in dict.items(): if value is not None: result[key] = value return result That says throw away every item in a dict if the Value is None. Are there any tighter or smarmier ways to do

Re: how to scrutch a dict()

2010-10-20 Thread James Mills
On Thu, Oct 21, 2010 at 2:32 PM, Phlip phlip2...@gmail.com wrote: Not Hyp: def _scrunch(**dict):    result = {}    for key, value in dict.items():        if value is not None:  result[key] = value    return result That says throw away every item in a dict if the Value is None. Are

Re: how to scrutch a dict()

2010-10-20 Thread Chris Rebert
On Wed, Oct 20, 2010 at 9:40 PM, Paul Rubin no.em...@nospam.invalid wrote: Phlip phlip2...@gmail.com writes: def _scrunch(**dict):     result = {}     for key, value in dict.items():         if value is not None:  result[key] = value     return result That says throw away every item in a

Re: how to scrutch a dict()

2010-10-20 Thread Ben Finney
Phlip phlip2...@gmail.com writes: Not Hyp: I don't know what this means; I hope it's not important. def _scrunch(**dict): You're clobbering the built-in ‘dict’ binding here. You're also requiring the input to be keyword parameters. Why not simply take a single parameter, and allow the

[issue10092] calendar does not restore locale properly

2010-10-20 Thread Stephen Hansen
Stephen Hansen me+pyt...@ixokai.io added the comment: I can't be entirely sure, because a) I have never even glanced at the calendar module, and b) my locale-fu is very weak, but my buildbot has consistently failed on this test since this commit:

[issue10150] Local references not released after exception

2010-10-20 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Alex is correct. (You can prove that by raising and catching another exception before the second getrefcount().) -- nosy: +georg.brandl resolution: - wont fix status: open - closed ___ Python

[issue10092] calendar does not restore locale properly

2010-10-20 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Let's see if r85735 fixed this. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10092 ___ ___

[issue10092] calendar does not restore locale properly

2010-10-20 Thread Georg Brandl
Changes by Georg Brandl ge...@python.org: Removed file: http://bugs.python.org/file19286/unnamed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10092 ___

[issue10151] Docs: can globals() be updated?

2010-10-20 Thread Thomas Guettler
New submission from Thomas Guettler guet...@thomas-guettler.de: Hi, the documentation of globals() is missing a note if you can update the dictionary: http://docs.python.org/library/functions.html?highlight=globals#globals For locals() it is documented:

[issue10128] multiprocessing.Pool throws exception with __main__.py

2010-10-20 Thread Ask Solem
Changes by Ask Solem a...@opera.com: -- resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10128 ___ ___

[issue8863] Display Python backtrace on SIGSEGV, SIGFPE and fatal error

2010-10-20 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: I don't think that a command line option and an environment variable is pratical for an OS distributor. Environment variables are probably the most practical for OS vendors, since they can simply set them in /etc/profile.d (Mandriva does that

[issue10092] calendar does not restore locale properly

2010-10-20 Thread Boštjan Mejak
Boštjan Mejak bostjan.me...@gmail.com added the comment: import calendar calendar.LocaleTextCalendar(locale='fr_FR').formatmonthname(2010,10,10) Traceback (most recent call last): File stdin, line 1, in module File C:\Python27\lib\calendar.py, line 522, in formatmonthname with

[issue10092] calendar does not restore locale properly

2010-10-20 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Bostjan, both your points are invalid. First, the locale settings that a machine supports vary greatly. fr_FR doesn't need to be a valid setting on your machine. Second, val in None will always fail. val in (None, ...) will succeed, since

[issue10151] Docs: can globals() be updated?

2010-10-20 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: It is documented, however, that globals() returns the dictionary of a module, which can be modified. For locals(), the situation is quite more complicated, which is why the warning there is warranted. -- nosy: +georg.brandl resolution:

[issue10092] calendar does not restore locale properly

2010-10-20 Thread Tim Golden
Tim Golden m...@timgolden.me.uk added the comment: Boštjan, the code segment you quote is the *fallback* if the C module hasn't been built for some reason. The module simply calls through to the underlying C Library. I notice you're running on Windows, so this is a useful MS page:

[issue10152] symtable.c: ste_tmpname uninitialized

2010-10-20 Thread Stefan Krah
New submission from Stefan Krah stefan-use...@bytereef.org: Found by Valgrind: ==3947== Use of uninitialised value of size 8 ==3947==at 0x5716D13: _itoa_word (in /lib/libc-2.8.90.so) ==3947==by 0x5719F53: vfprintf (in /lib/libc-2.8.90.so) ==3947==by 0x5743239: vsnprintf (in

[issue10152] symtable.c: ste_tmpname uninitialized

2010-10-20 Thread Stefan Krah
Changes by Stefan Krah stefan-use...@bytereef.org: -- stage: - patch review type: - behavior versions: +Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10152 ___

[issue6864] IDLE 2.6.1 locks up on Mac OS 10.6

2010-10-20 Thread Ronald Oussoren
Ronald Oussoren ronaldousso...@mac.com added the comment: Richard: I don't understand your message. What abort are you talking about? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6864

[issue1349106] email.Generator does not separate headers with \r\n

2010-10-20 Thread Malcolm Box
Malcolm Box malcolm@gmail.com added the comment: David: Great to see a patch for this. You're right of course, 8bit isn't binary - I meant binary. The main place this shows up is when you're using MIME not in email (e.g. on the web), where binary transport is entirely possible. This fix

[issue10153] Memory leak in pythonrun.c

2010-10-20 Thread Stefan Krah
New submission from Stefan Krah stefan-use...@bytereef.org: Found by Valgrind, patch attached: ==4921== 24 bytes in 1 blocks are definitely lost in loss record 419 of 2,694 ==4921==at 0x4C2412C: malloc (vg_replace_malloc.c:195) ==4921==by 0x417F06: _PyObject_New (object.c:244) ==4921==

[issue10152] symtable.c: ste_tmpname uninitialized

2010-10-20 Thread Stefan Krah
Changes by Stefan Krah stefan-use...@bytereef.org: -- components: +Interpreter Core ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10152 ___ ___

[issue10149] Data truncation in expat parser

2010-10-20 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: For other reviewers, I'm reposting just his python program as a text file. Maciek: I myself don't know enough about expat to comment, but is it possible you have an issue similar to issue 10026? -- nosy: +r.david.murray Added

[issue10152] symtable.c: ste_tmpname uninitialized

2010-10-20 Thread Benjamin Peterson
Changes by Benjamin Peterson benja...@python.org: -- assignee: - benjamin.peterson nosy: +benjamin.peterson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10152 ___

[issue7473] Compile error when building a 3-way universal framework when a 2-way universal framework is present

2010-10-20 Thread Ronald Oussoren
Ronald Oussoren ronaldousso...@mac.com added the comment: I've verified that the patch does not cause problems when building the OSX installer. That patch should be applied, with a short comment that explains why the code block is disabled for framework builds. -- versions: -Python

[issue10128] multiprocessing.Pool throws exception with __main__.py

2010-10-20 Thread Michael Olson
Michael Olson ol...@irinim.net added the comment: Ummm, I think I've been unclear on where I was making changes, I changed lib\multiprocessing\forking.py to fix the issue. Patch attached. -- keywords: +patch resolution: invalid - status: closed - open Added file:

[issue10128] multiprocessing.Pool throws exception with __main__.py

2010-10-20 Thread Michael Olson
Michael Olson ol...@irinim.net added the comment: As a note, I didn't attach a patch at first because I was fairly sure I was kludging it into submission, but at least this makes it clear as to what I did. v/r -- Michael Olson -- ___ Python tracker

[issue7473] Compile error when building a 3-way universal framework when a 2-way universal framework is present

2010-10-20 Thread Ronald Oussoren
Ronald Oussoren ronaldousso...@mac.com added the comment: Committed the fix for 3.2 in r85744, for 2.7 in r85745 and for 3.1 in r85746 BTW. The installer does mention which architectures are supported, both in a README on the disk image and in one of the readme screens in the installer.

[issue763708] Failures in test_macostools for --enable-unicode=ucs4

2010-10-20 Thread Ronald Oussoren
Changes by Ronald Oussoren ronaldousso...@mac.com: Removed file: http://bugs.python.org/file13487/issue763708.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue763708 ___

[issue763708] Failures in test_macostools for --enable-unicode=ucs4

2010-10-20 Thread Ronald Oussoren
Ronald Oussoren ronaldousso...@mac.com added the comment: I've attached a new patch that works for me. The new patch doesn't try to warn when running the configure script, but bails out when you run make by using an '#error' in pymacconfig.h. (Removing 2.6 because that's in security-fix-only

[issue3367] Uninitialized value read in parsetok.c

2010-10-20 Thread Stefan Krah
Stefan Krah stefan-use...@bytereef.org added the comment: I can still reproduce it in py3k just by hitting Ctrl-D in the interactive interpreter: $ valgrind --db-attach=yes --suppressions=Misc/valgrind-python.supp ./python ==16724== Memcheck, a memory error detector ==16724== Copyright (C)

[issue6864] IDLE 2.6.1 locks up on Mac OS 10.6

2010-10-20 Thread Richard
Richard pub...@careaga.net added the comment: Sorry to be obscure, Ronald. I mistook my configuration problem, described below for the original problem. But I can reproduce the problem with opening an existing file under IDLE, which is a segmentation fault. When opening a new window, I get a

[issue9670] Exceed Recursion Limit in Thread

2010-10-20 Thread Ronald Oussoren
Ronald Oussoren ronaldousso...@mac.com added the comment: The attached patch explicitly sets the minimal stack size to about 704K, which is the minimal size where 'def f(): f()' doesn't cause a buserror when run in a thread. -- keywords: +needs review, patch stage: needs patch - patch

[issue6763] Crash on mac os x leopard in mimetypes.guess_type (or PyObject_Malloc)

2010-10-20 Thread Ronald Oussoren
Ronald Oussoren ronaldousso...@mac.com added the comment: I'm closing this as a duplicate of #9670, that is: too deep recursion in a thread doesn't trigger the appropriate exception but causes a hard crash instead. I have attached a patch to that issue (but haven't applied it yet, I'd like

[issue9047] Python 2.7rc2 includes -isysroot twice on each gcc command line

2010-10-20 Thread Ronald Oussoren
Ronald Oussoren ronaldousso...@mac.com added the comment: Marc-Andre: does the current HEAD of the 2.7 and 3.2 branches work for you? The build still has duplicate flags, but that doesn't seem to cause problems on my machines. If it also doesn't cause problems on your machines I'd prefer to

[issue10154] locale.normalize strips - from UTF-8, which fails on Mac

2010-10-20 Thread Stephen Hansen
New submission from Stephen Hansen me+pyt...@ixokai.io: In the course of investigating issue10092, Georg discovered that the behavior of locale.normalize() on Mac is bad. Basically, en_US.UTF-8 is how the correct locale string should be spelled on the Mac. If you drop the dash, it fails:

  1   2   >