[Germany / München] Munich Python User Grou p Meeting this thursday!

2010-06-23 Thread Stefan Behnel
Hi, sorry for choosing this forum for a regional announcement - just hoping to attract some local users who don't read the local mailing list. After a while of silence, there will be a meeting of the µPy (Münchner Python User Group) this thursday (June 24th). See here for further

Re: Using Unicode file names with ftplib and encodings.idna as a workaround?

2010-06-23 Thread Gabriel Genellina
En Tue, 22 Jun 2010 11:43:34 -0300, pyt...@bdurham.com escribió: Python 2.6.5 (Win32): Is there a work around for ftplib's (and ftputil's) apparent inability to support Unicode file names? I'm thinking that I might be able to use the encodings.idna as a work around for this? According to RFC

Re: isinstance question

2010-06-23 Thread Satish Eerpini
I want to test whether an object is an instance of any user-defined class. isinstance is less helpful than one would expect. import types class foo() : # define dummy class ... pass ... x = foo() type(x) type 'instance' isinstance(x, types.ClassType) False

[Germany / München] Munich Python User Grou p Meeting this thursday!

2010-06-23 Thread Stefan Behnel
Hi, sorry for choosing this forum for a regional announcement - just hoping to attract some local users who don't read the local mailing list. After a while of silence, there will be a meeting of the µPy (Münchner Python User Group) this thursday (June 24th). See here for further

Re: adding new function

2010-06-23 Thread Gabriel Genellina
En Tue, 22 Jun 2010 14:18:59 -0300, Terry Reedy tjre...@udel.edu escribió: On 6/22/2010 5:44 AM, Daniel Fetchinson wrote: how can i simply add new functions to module after its initialization (Py_InitModule())? I'm missing something like PyModule_AddCFunction(). in Python, for modules

Re: Book review / advise

2010-06-23 Thread Stephen Hansen
On 6/22/10 9:45 PM, John Bokma wrote: Stephen Hansen me+list/pyt...@ixokai.io writes: I *have* seen people burned by confusion over situations *extremely* similar to this; But is it? You didn't even ask yourself that question. Yes. I did. I don't really make a point of publishing

Re: encodings.idna.ToASCII( unicodeStr ) != unicodeStr.encode( 'idna' )

2010-06-23 Thread Gabriel Genellina
En Tue, 22 Jun 2010 11:02:58 -0300, pyt...@bdurham.com escribió: Python 2.6.4 (Win32): Anyone have any explanation for the following encodings.idna.ToASCII( unicodeStr ) != unicodeStr.encode( 'idna' ) Given that other processes may have to use the output of these methods, what is the

Re: adding new function

2010-06-23 Thread Christian Heimes
Am 22.06.2010 19:18, schrieb Terry Reedy: On 6/22/2010 5:44 AM, Daniel Fetchinson wrote: how can i simply add new functions to module after its initialization (Py_InitModule())? I'm missing something like PyModule_AddCFunction(). in Python, for modules written in python import mymod

Re: Should I Learn Python or Ruby next?

2010-06-23 Thread Jean-Michel Pichavant
rantingrick wrote: --- On Jun 22, 4:29 am, Jean-Michel Pichavant jeanmic...@sequans.com wrote: This is a python list, fully dedicated to our dutch semi God. So how can you even immagine that someone here will suggest you to go for rub... sorry I can't prononce this blasphemous name.

Re: isinstance question

2010-06-23 Thread Thomas Jollans
On 06/23/2010 08:39 AM, Satish Eerpini wrote: I want to test whether an object is an instance of any user-defined class. isinstance is less helpful than one would expect. import types class foo() : # define dummy class ... pass

example of multi threads

2010-06-23 Thread Mag Gam
I am looking for a simple multi threaded example. Lets say I have to ssh to 20 servers and I would like to that in parallel. Can someone please provide a an example for that? thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: Should I Learn Python or Ruby next?

2010-06-23 Thread hackingKK
Ruby is a nice language to learn, but I seem to find it less matured. That might be my own personal perception. But looking at its success which you can read on Pythonology, I think it is going to be my choice and of many others for a long time to come. Besides ruby is more popular due to the

Re: example of multi threads

2010-06-23 Thread Stefan Behnel
Mag Gam, 23.06.2010 12:24: I am looking for a simple multi threaded example. Lets say I have to ssh to 20 servers and I would like to that in parallel. Can someone please provide a an example for that? Sounds like you want to run background processes, not threads. Take a look at the

Instance method decorator garbage collection problem

2010-06-23 Thread John Reid
Hi, I've written a decorator that prints exceptions and I'm having some trouble with garbage collection. My decorator is: import sys def print_exception_decorator(fn): def decorator(self, *args, **kwds): try: return fn(*args, **kwds) except: print

Re: Instance method decorator garbage collection problem

2010-06-23 Thread Thomas Jollans
On 06/23/2010 01:40 PM, John Reid wrote: Hi, I've written a decorator that prints exceptions and I'm having some trouble with garbage collection. My decorator is: import sys def print_exception_decorator(fn): def decorator(self, *args, **kwds): try: return

Re: Instance method decorator garbage collection problem

2010-06-23 Thread Peter Otten
John Reid wrote: Hi, I've written a decorator that prints exceptions and I'm having some trouble with garbage collection. My decorator is: import sys def print_exception_decorator(fn): def decorator(self, *args, **kwds): try: return fn(*args, **kwds)

Re: Instance method decorator garbage collection problem

2010-06-23 Thread Christian Heimes
The InstanceCounted.count is 1 at the end. If I omit the call to self.method = print_exception_decorator(self.method) then the instance count goes down to 0 as desired. I thought that the decorator might be holding a reference to the instance through the bound method, so I added the

Re: Instance method decorator garbage collection problem

2010-06-23 Thread John Reid
Thomas Jollans wrote: The InstanceCounted.count is 1 at the end. If I omit the call to self.method = print_exception_decorator(self.method) then the instance count goes down to 0 as desired. I thought that the decorator might be holding a reference to the instance through the bound method, so

Re: Should I Learn Python or Ruby next?

2010-06-23 Thread Ed Keith
--- On Wed, 6/23/10, Stephen Hansen me+list/pyt...@ixokai.io wrote: From: Stephen Hansen me+list/pyt...@ixokai.io Subject: Re: Should I Learn Python or Ruby next? To: python-list@python.org Date: Wednesday, June 23, 2010, 1:51 AM On 6/22/10 10:39 PM, Dennis Lee Bieber wrote: On Tue, 22

Re: Should I Learn Python or Ruby next?

2010-06-23 Thread Ed Keith
--- On Wed, 6/23/10, Dennis Lee Bieber wlfr...@ix.netcom.com wrote: From: Dennis Lee Bieber wlfr...@ix.netcom.com Subject: Re: Should I Learn Python or Ruby next? To: python-list@python.org Date: Wednesday, June 23, 2010, 1:39 AM On Tue, 22 Jun 2010 15:55:51 -0700, Stephen Hansen

Another MySQL Problem

2010-06-23 Thread Victor Subervi
Hi; I have this line: cursor.execute('select clientEmail from clients where client=%s', (string.replace(client, '_', ' '))) clientEmail = cursor.fetchone()[0] cursor.execute('select * from %s' % (client)) client = Lincoln_Properties With the replacement, the interpreter complains that

Re: Should I Learn Python or Ruby next?

2010-06-23 Thread Dave Angel
Stephen Hansen wrote: On 6/22/10 10:39 PM, Dennis Lee Bieber wrote: On Tue, 22 Jun 2010 15:55:51 -0700, Stephen Hansen me+list/pyt...@ixokai.io declaimed the following in gmane.comp.python.general: I second Forth. Learning and using that was -- slightly painful, but

Re: Another MySQL Problem

2010-06-23 Thread Stephen Hansen
On 6/23/10 6:45 AM, Victor Subervi wrote: Hi; I have this line: cursor.execute('select clientEmail from clients where client=%s', (string.replace(client, '_', ' '))) clientEmail = cursor.fetchone()[0] cursor.execute('select * from %s' % (client)) client = Lincoln_Properties With

Parsing email

2010-06-23 Thread Xianwen Chen
Hi guys, I use these codes to read emails from an IMAP server: import imaplib imap_srv_addr = someserver imap_srv = imaplib.IMAP4_SSL(imap_srv_addr) imap_srv.login(username,passwd) imap_srv.select(Inbox) msg = imap_srv.fetch(1, '(RFC822)') How can I parse msg so it can be appended to the other

Re: Another MySQL Problem

2010-06-23 Thread Victor Subervi
On Wed, Jun 23, 2010 at 10:25 AM, Stephen Hansen me+list/pyt...@ixokai.iowrote: On 6/23/10 6:45 AM, Victor Subervi wrote: Hi; I have this line: cursor.execute('select clientEmail from clients where client=%s', (string.replace(client, '_', ' '))) clientEmail = cursor.fetchone()[0]

Re: Another MySQL Problem

2010-06-23 Thread Stephen Hansen
On 6/23/10 8:16 AM, Victor Subervi wrote: On Wed, Jun 23, 2010 at 10:25 AM, Stephen Hansen me+list/pyt...@ixokai.io mailto:pyt...@ixokai.io wrote: On 6/23/10 6:45 AM, Victor Subervi wrote: Hi; I have this line: cursor.execute('select clientEmail from clients

Re: Another MySQL Problem

2010-06-23 Thread Simon Malinge
On Wed, 23 Jun 2010 10:46:37 -0430, Victor Subervi victorsube...@gmail.com wrote: On Wed, Jun 23, 2010 at 10:25 AM, Stephen Hansen me+list/pyt...@ixokai.iowrote: On 6/23/10 6:45 AM, Victor Subervi wrote: Hi; I have this line: cursor.execute('select clientEmail from clients where

Does a '_sre.SRE_Pattern' have state,or is it thread-safe?

2010-06-23 Thread John Nagle
'_sre.SRE_Pattern' is what re.compile returns. Is that a mutable object, with state that changes during the parse, or is it an immutable constant? Can two threads use the same '_sre.SRE_Pattern' at the same time? (I'm writing something to find race conditions in existing code, which

Re: Another MySQL Problem

2010-06-23 Thread Paul Rubin
Stephen Hansen me+list/pyt...@ixokai.io writes: On 6/23/10 6:45 AM, Victor Subervi wrote: cursor.execute('select clientEmail from clients where client=%s', ... Do, 'client.replace(_, )' instead. Er, look what happened to Little Bobby Tables (a quick web search on his name should find his

Re: Another MySQL Problem

2010-06-23 Thread Tapi
On Wed, 23 Jun 2010 10:46:37 -0430, Victor Subervi victorsube...@gmail.com wrote: On Wed, Jun 23, 2010 at 10:25 AM, Stephen Hansen me+list/pyt...@ixokai.iowrote: On 6/23/10 6:45 AM, Victor Subervi wrote: Hi; I have this line: cursor.execute('select clientEmail from clients where

Re: Another MySQL Problem

2010-06-23 Thread Tim Chase
On 06/23/2010 08:45 AM, Victor Subervi wrote: Hi; I have this line: cursor.execute('select clientEmail from clients where client=%s', (string.replace(client, '_', ' '))) clientEmail = cursor.fetchone()[0] cursor.execute('select * from %s' % (client)) client = Lincoln_Properties With

Re: Another MySQL Problem

2010-06-23 Thread Victor Subervi
Ok, let's start all over again. When I have this code: cursor.execute('select clientEmail from clients where client=%s', (client.replace('_', ' '),)) clientEmail = cursor.fetchone()[0] I get this error: /var/www/html/globalsolutionsgroup.vi/mailSpreadsheet.py 67 /body 68 /html'''

the bugerrd code

2010-06-23 Thread Victoria Hernandez
The new mision I herits the buggered code (i do not the bugger). How do debugger him? Tahnk you very much. Vikhy :) -- http://mail.python.org/mailman/listinfo/python-list

Re: Another MySQL Problem

2010-06-23 Thread Stephen Hansen
On Jun 23, 2010, at 9:12 AM, Paul Rubin no.em...@nospam.invalid wrote: Stephen Hansen me+list/pyt...@ixokai.io writes: On 6/23/10 6:45 AM, Victor Subervi wrote: cursor.execute('select clientEmail from clients where client=%s', ... Do, 'client.replace(_, )' instead. Er, look what happened

Re: Another MySQL Problem

2010-06-23 Thread Stephen Hansen
On Jun 23, 2010, at 9:28 AM, Victor Subervi victorsube...@gmail.com wrote: Ok, let's start all over again. When I have this code: cursor.execute('select clientEmail from clients where client=%s', (client.replace('_', ' '),)) clientEmail = cursor.fetchone()[0] Already addressed this. Do not

Re: Book review / advise

2010-06-23 Thread John Bokma
Stephen Hansen me+list/pyt...@ixokai.io writes: On 6/22/10 9:48 PM, John Bokma wrote: [..] Its when you package it up in such a way that the buyer doesn't realize what they're buying, that's where the problem comes-- and that's what is happening quite a lot these days. Which is not the

Re: Does a '_sre.SRE_Pattern' have state,or is it thread-safe?

2010-06-23 Thread Stephen Hansen
On Jun 23, 2010, at 9:10 AM, John Nagle na...@animats.com wrote: '_sre.SRE_Pattern' is what re.compile returns. Is that a mutable object, with state that changes during the parse, or is it an immutable constant? Can two threads use the same '_sre.SRE_Pattern' at the same time? Ouch. I

ttk Scale: missing attributes

2010-06-23 Thread Alan G Isaac
Tkinter's Scale widget had a `label` and a `resolution` attribute. These appear to be missing from the Ttk Scale widget. Is there a reason? These were important attributes. Thanks, Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: Does a '_sre.SRE_Pattern' have state,or is it thread-safe?

2010-06-23 Thread MRAB
John Nagle wrote: '_sre.SRE_Pattern' is what re.compile returns. Is that a mutable object, with state that changes during the parse, or is it an immutable constant? Can two threads use the same '_sre.SRE_Pattern' at the same time? (I'm writing something to find race conditions in

Re: Instance method decorator garbage collection problem

2010-06-23 Thread Thomas Jollans
On 06/23/2010 02:56 PM, John Reid wrote: Thomas Jollans wrote: The InstanceCounted.count is 1 at the end. If I omit the call to self.method = print_exception_decorator(self.method) then the instance count goes down to 0 as desired. I thought that the decorator might be holding a reference

Re: Another MySQL Problem

2010-06-23 Thread Victor Subervi
On Wed, Jun 23, 2010 at 12:51 PM, Stephen Hansen ixo...@ixokai.io wrote: The problem is not this line but: File /var/www/html/globalsolutionsgroup.vi/mailSpreadsheet.py, line 38, in mailSpreadsheet cursor.execute('select * from %s', (client,)) This one. Yes, can't use the comma,

Re: Another MySQL Problem

2010-06-23 Thread Stephen Hansen
On Jun 23, 2010, at 11:20 AM, Victor Subervi victorsube...@gmail.com wrote: On Wed, Jun 23, 2010 at 12:51 PM, Stephen Hansen ixo...@ixokai.io wrote: The problem is not this line but: File /var/www/html/globalsolutionsgroup.vi/mailSpreadsheet.py, line 38, in mailSpreadsheet

Re: Should I Learn Python or Ruby next?

2010-06-23 Thread Terry Reedy
On 6/23/2010 1:39 AM, Dennis Lee Bieber wrote: On Tue, 22 Jun 2010 15:55:51 -0700, Stephen Hansen me+list/pyt...@ixokai.io declaimed the following in gmane.comp.python.general: I second Forth. Learning and using that was -- slightly painful, but Just pick up any advanced HP

Re: Jew JUDGE shows off JEW POWER by BULLYING and BLACKMAILING a BLACK PRESIDENT OBAMA

2010-06-23 Thread nanothermite911fbibustards
FASCINATING !!! An ECOLOGICAL DISASTER is taking place. There is a need for HERCULEAN effort to STOP the oil spill. Then there is need for a THOROUGH study of the incident and EXEMPLARY PUNISHMENT of ALL THE OIL COMPANY BASTARDS, Brits, Halliburtons and ALL of them. But the JUDGE is worried about

Re: Should I Learn Python or Ruby next?

2010-06-23 Thread Rhodri James
On Wed, 23 Jun 2010 04:25:38 +0100, rantingrick rantingr...@gmail.com wrote: On Jun 22, 9:31 pm, MRAB pyt...@mrabarnett.plus.com wrote: [snip] Napoleon once said Never interrupt your enemy when he is making a mistake.! :-) And how exactly does your example express itself in a more

How to send a non-standard IMAP command?

2010-06-23 Thread Xianwen Chen
Dear Pythoners, I need to send one line of commands to an IMAP server. The commands are not standard IMAP protocols, hence it's not specified in http://docs.python.org/library/imaplib.html. Can you please give me a hint? Best regards, Xianwen --

Pythonic Idiom For Searching An Include Path

2010-06-23 Thread Tim Daneliuk
Given a program 'foo' that takes a command line argument '-I includefile', I want to be able to look for 'includefile' in a path specified in an environment variable, 'FOOPATH'. I'd like a semantic that says: If 'includefile' contains one or more path separator characters, ignore 'FOOPATH'.

Re: Should I Learn Python or Ruby next?

2010-06-23 Thread rantingrick
On Jun 23, 4:43 pm, Rhodri James rho...@wildebst.demon.co.uk wrote: And how exactly does your example express itself in a more syntactically-correct linear-flow than the two code snippets i provided earlier, hmmm? You did rather carefully pick an example where Python's syntax flow the  

Re: Should I Learn Python or Ruby next?

2010-06-23 Thread Stephen Hansen
Would you like to present another way of achieving the same code that makes Python look better, i would love to see it. Here is an even more interesting example of Ruby linear-flow verses Python lisp-style- nesting... RUBY: [three,one,two].map{|x| x.capitalize}.sort.join(',') PYTHON

Re: How to send a non-standard IMAP command?

2010-06-23 Thread Tim Chase
On 06/23/2010 05:22 PM, Xianwen Chen wrote: I need to send one line of commands to an IMAP server. The commands are not standard IMAP protocols, hence it's not specified in http://docs.python.org/library/imaplib.html. Sounds like you want to use the imaplib's IMAP4.xatom() to send a custom

modifying standard library functionality (difflib)

2010-06-23 Thread Vlastimil Brom
Hi all, I'd like to ask about the most reasonable/recommended/... way to modify the functionality of the standard library module (if it is recommended at all). I'm using difflib.SequenceMatcher for character-wise comparisons of the texts; although this might not be a usual use case, the results

Re: Pythonic Idiom For Searching An Include Path

2010-06-23 Thread Chris Rebert
On Wed, Jun 23, 2010 at 3:27 PM, Tim Daneliuk tun...@tundraware.com wrote: Given a program 'foo' that takes a command line argument '-I includefile', I want to be able to look for 'includefile' in a path specified in an environment variable, 'FOOPATH'. I'd like a semantic that says:  If

[ANN] filepath 0.1

2010-06-23 Thread exarkun
Hello all, I'm happy to announce the initial release of filepath. filepath is an abstract interface to the filesystem. It provides APIs for path name manipulation and for inspecting and modifying the filesystem (for example, renaming files, reading from them, etc). filepath's APIs are

Re: Jew JUDGE shows off JEW POWER by BULLYING and BLACKMAILING a BLACK PRESIDENT OBAMA

2010-06-23 Thread MooseFET
On Jun 23, 2:02 pm, nanothermite911fbibustards nanothermite911fbibusta...@gmail.com wrote: FASCINATING !!! An ECOLOGICAL DISASTER is taking place. There is a need for HERCULEAN effort to STOP the oil spill. Then there is need for a THOROUGH study of the incident and EXEMPLARY PUNISHMENT of

Re: print line number and source filename

2010-06-23 Thread Peng Yu
On Tue, Jun 22, 2010 at 12:13 PM, Stephen Hansen me+list/pyt...@ixokai.io wrote: On 6/22/10 9:44 AM, Peng Yu wrote: Also, always importing the inspect module and getting the frame and accessing the lineno from the frame is not very convenient to type. Is there a shorter way to access the line

Re: Jew JUDGE shows off JEW POWER by BULLYING and BLACKMAILING a BLACK PRESIDENT OBAMA

2010-06-23 Thread k...@att.bizzzzzzzzzzzz
On Wed, 23 Jun 2010 19:10:45 -0700 (PDT), MooseFET kensm...@rahul.net wrote: On Jun 23, 2:02 pm, nanothermite911fbibustards nanothermite911fbibusta...@gmail.com wrote: FASCINATING !!! An ECOLOGICAL DISASTER is taking place. There is a need for HERCULEAN effort to STOP the oil spill. Then

Does distutils support python setup.py test?

2010-06-23 Thread John Nagle
Many library modules support python setup.py test, but the Python distutils documentation at http://docs.python.org/distutils/configfile.html makes no mention of it, except as a possible future extension. Some setup.py files have test_suite = modulename but that doesn't

Types missing from typesmodule

2010-06-23 Thread John Nagle
Here's dir(types), in Python 2.6.5: ['BooleanType', 'BufferType', 'BuiltinFunctionType', 'BuiltinMethodType', 'ClassType', 'CodeType', 'ComplexType', 'DictProxyType', 'DictType', 'DictionaryType', 'EllipsisType', 'FileType', 'FloatType', 'FrameType', 'FunctionType', 'GeneratorType',

best way to increment an IntVar?

2010-06-23 Thread Alan G Isaac
Of course one can do myintvar.set(myintvar.get()+1) but surely there is a better way? I'm surprsied that myintvar += 1 is not allowed. Thanks, Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: Types missing from typesmodule

2010-06-23 Thread Stephen Hansen
Sent from my iPad On Jun 23, 2010, at 9:24 PM, John Nagle na...@animats.com wrote: Here's dir(types), in Python 2.6.5: ['BooleanType', 'BufferType', 'BuiltinFunctionType', 'BuiltinMethodType', 'ClassType', 'CodeType', 'ComplexType', 'DictProxyType', 'DictType', 'DictionaryType',

Re: Types missing from typesmodule

2010-06-23 Thread Stephen Hansen
On Jun 23, 2010, at 9:24 PM, John Nagle na...@animats.com wrote: Here's dir(types), in Python 2.6.5: ['BooleanType', 'BufferType', 'BuiltinFunctionType', 'BuiltinMethodType', 'ClassType', 'CodeType', 'ComplexType', 'DictProxyType', 'DictType', 'DictionaryType', 'EllipsisType', 'FileType',

Re: best way to increment an IntVar?

2010-06-23 Thread Ben Finney
Alan G Isaac alan.is...@gmail.com writes: Of course one can do myintvar.set(myintvar.get()+1) but surely there is a better way? What is an IntVar? It's not a built-in type, so you'll need to tell us. type(myintvar) Where is it imported from? import sys

Re: best way to increment an IntVar?

2010-06-23 Thread rantingrick
On Jun 24, 12:07 am, Ben Finney ben+pyt...@benfinney.id.au wrote: Alan G Isaac alan.is...@gmail.com writes: Of course one can do    myintvar.set(myintvar.get()+1) but surely there is a better way? What is an IntVar? It's not a built-in type, so you'll need to tell us. For those who

[issue9046] Python 2.7rc2 doesn't build on Mac OS X 10.4

2010-06-23 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com added the comment: Ronald Oussoren wrote: Ronald Oussoren ronaldousso...@mac.com added the comment: I don't agree that there must be an option to fall back to system provided libs. The point of using an SDK is to avoid doing that because you might end

[issue3439] create a numbits() method for int and long types

2010-06-23 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Ah; sorry for misunderstanding. Thanks for the explanation, Terry! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3439 ___

[issue9025] Non-uniformity in randrange for large arguments.

2010-06-23 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: FWIW, here are two approaches to getting an equi-distributed version of int(n*random()) where 0 n = 2**53. The first mirrors the approach currently in the code. The second approach makes fewer calls to random(). def

[issue9046] Python 2.7rc2 doesn't build on Mac OS X 10.4

2010-06-23 Thread Ronald Oussoren
Ronald Oussoren ronaldousso...@mac.com added the comment: That (/usr/local/src) explains why I haven't been able to reproduce the problem, that worried me a little. W.r.t. to the SDK: 1) You don't have to use an SDK: use configure --enable-universalsdk=/ MACOSX_DEPLOYMENT_TARGET=10.5

[issue9046] Python 2.7rc2 doesn't build on Mac OS X 10.4

2010-06-23 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com added the comment: Ronald Oussoren wrote: Ronald Oussoren ronaldousso...@mac.com added the comment: That (/usr/local/src) explains why I haven't been able to reproduce the problem, that worried me a little. W.r.t. to the SDK: 1) You don't have to

[issue9025] Non-uniformity in randrange for large arguments.

2010-06-23 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Either of these looks good to me. If the last line of the second is changed from return int(r) % n to return int(r) // (N // n) then it'll use the high-order bits of random() instead of the low-order bits. This doesn't matter for MT, but

[issue7900] posix.getgroups() failure on Mac OS X

2010-06-23 Thread Ronald Oussoren
Ronald Oussoren ronaldousso...@mac.com added the comment: Wrt. non-gcc compilers: we do need to worry about those (there have been bugreports in the past about using the Intel compiler), but those compilers still have to be able to process system headers and Martin's patch basicly adds the

[issue8930] messed up formatting after reindenting

2010-06-23 Thread Stefan Krah
Stefan Krah stefan-use...@bytereef.org added the comment: Patch for ceval.c. If you agree with the macro indentation (starting in line 815) I can commit it and port it to the other branches. -- keywords: +patch nosy: +skrah Added file:

[issue9059] Backwards compatibility

2010-06-23 Thread Raven Demeyer
New submission from Raven Demeyer raven.deme...@gmail.com: Python 3 is not backwards compatible with Python 2. Example: Python 2: print 'foo' Python 3: print(bar) Problem: Code written for Python during version 2 cannot be used/compiled in version 3 Solution: Just like any decent

[issue9060] Python/dup2.c doesn't compile on (at least) newlib

2010-06-23 Thread Torne Wuff
New submission from Torne Wuff torne-pythonb...@wolfpuppy.org.uk: On systems without dup2(), Python tries to compile its own from Python/dup2.c, but this file refers to close() without including unistd.h. This causes it to not compile with newlib (and possibly other C libraries, presumably it

[issue9059] Backwards compatibility

2010-06-23 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: as stated in http://www.python.org/download/releases/3.1.2/ python 3 is designed to be backwards incompatible. I suggest you to follow the link Conversion tool for Python 2.x code. -- nosy: +amaury.forgeotdarc resolution: -

[issue9059] Backwards compatibility

2010-06-23 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Code written for Python during version 2 cannot be used/compiled in version 3 Use 2to3 script to convert your Python2 program to Python3. More information at: http://docs.python.org/py3k/whatsnew/3.0.html#porting-to-python-3-0

[issue9059] Backwards compatibility

2010-06-23 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: Python 2 is also forward compatible with several Python 3 features, for example: from __future__ import print_function print('foo') foo -- components: -Regular Expressions nosy: +ezio.melotti stage: - committed/rejected

[issue8254] write a configure command

2010-06-23 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: 5) Should the command write different files per Python version and platform? 4Suite’s config command does that. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8254

[issue8930] messed up formatting after reindenting

2010-06-23 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Stefan: it's ok with me, thanks. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8930 ___ ___

[issue9060] Python/dup2.c doesn't compile on (at least) newlib

2010-06-23 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: (as a sidenote, the last significant changes to dup2.c date back from 1994) -- nosy: +gvanrossum, loewis, pitrou versions: +Python 3.2 ___ Python tracker rep...@bugs.python.org

[issue8254] write a configure command

2010-06-23 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Shouldn't config and configure have more distinguishable names? (if I understand correctly, they both are distutils2 commands) -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org

[issue9025] Non-uniformity in randrange for large arguments.

2010-06-23 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: This wouldn't be the first time reproduceability is dropped, since reading from the docs: “As an example of subclassing, the random module provides the WichmannHill class that implements an alternative generator in pure Python. The class

[issue8254] write a configure command

2010-06-23 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: 4Suite’s DistExt has a config command similar to the new Distutils2 configure command described in this bug report. The Distutils config command is an unfinished command with use similar to autotools configure scripts. From the module

[issue8999] Add Mercurial support to patchcheck

2010-06-23 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: The purpose of patchcheck.py is not obvious to me. If it's meant to be used by committers (rather than contributors), than we should wait for the actual hg migration and the definition of our new workflow. Also, we might need two separate

[issue7900] posix.getgroups() failure on Mac OS X

2010-06-23 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: Reposting from python-dev. See os.getgroups() on MacOS X http://mail.python.org/pipermail/python-dev/2010-June/100960.html. On Wed, Jun 23, 2010 at 2:08 AM, Ronald Oussoren ronaldousso...@mac.com wrote: .. * [Ronald's

[issue9061] cgi.escape Can Lead To XSS Vulnerabilities

2010-06-23 Thread Craig Younkins
New submission from Craig Younkins cyounk...@gmail.com: The method in question: http://docs.python.org/library/cgi.html#cgi.escape http://svn.python.org/view/python/tags/r265/Lib/cgi.py?view=markup # at the bottom http://code.python.org/hg/trunk/file/3be6ff1eebac/Lib/cgi.py#l1031 Convert the

[issue9061] cgi.escape Can Lead To XSS Vulnerabilities

2010-06-23 Thread Craig Younkins
Changes by Craig Younkins cyounk...@gmail.com: -- type: - security ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9061 ___ ___ Python-bugs-list

[issue9062] urllib.urlopen crashes when launched from a thread

2010-06-23 Thread Olivier Berten
New submission from Olivier Berten olivier.ber...@gmail.com: I'm writing SwatchBooker https://launchpad.net/swatchbooker, an app that's (among other things) reading some data from the web. When urllib.urlopen is called first from within a secondary thread, the app crashes (or freezes). If

[issue8798] tkinter build variants on OSX

2010-06-23 Thread Sridhar Ratnakumar
Changes by Sridhar Ratnakumar sridh...@activestate.com: -- nosy: +hobbs, srid, trentm ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8798 ___ ___

[issue9016] IDLE won't launch (Win XP)

2010-06-23 Thread Jon Seger
Jon Seger se...@biology.utah.edu added the comment: Actually I did do exactly what Martin requested, but then somehow I failed to include the output in my message, which doesn't really make sense as a result. How embarrassing! I apologize. I thought I had included something like the

[issue9025] Non-uniformity in randrange for large arguments.

2010-06-23 Thread Senthil Kumaran
Senthil Kumaran orsent...@gmail.com added the comment: I guess, Antoine wanted to point out this: Changed in version 2.3: MersenneTwister replaced Wichmann-Hill as the default generator. But as the paragraph points out Python did provide non default WichmanHill class for generating repeatable

[issue5672] Implement a way to change the python process name

2010-06-23 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5672 ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue8999] Add Mercurial support to patchcheck

2010-06-23 Thread Brett Cannon
Brett Cannon br...@python.org added the comment: So patchcheck is meant for both contributors and committers. I originally wrote it for me, but it helps make sure the patch is in a reasonable state before someone submits a patch. As for Hg support, enough people seem to run mq on top of svn

[issue9063] TZ examples in datetime.rst are incorrect

2010-06-23 Thread Alexander Belopolsky
New submission from Alexander Belopolsky belopol...@users.sourceforge.net: With python started at the root of the source tree and TZ=US/Eastern in the environment, exec(open('Doc/includes/tzinfo-examples.py').read()) import os os.environ['TZ'] 'US/Eastern' from datetime import * x =

[issue9025] Non-uniformity in randrange for large arguments.

2010-06-23 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: BTW, the Wichmann-Hill code is gone in py3k, so that doc paragraph needs removing or updating. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9025

[issue9063] TZ examples in datetime.rst are incorrect

2010-06-23 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: The result given when Eastern tzinfo object is used is clearly wrong. The timezone shift should not change the actual time, but x == x.astimezone(Eastern) False while x == x.astimezone(Local) True --

[issue9062] urllib.urlopen crashes when launched from a thread

2010-06-23 Thread Senthil Kumaran
Senthil Kumaran orsent...@gmail.com added the comment: There isn't a problem with urllib with respect to threading as such. There are programs and examples which use this module in multi-threading environment. I could not run your app, I am not on Mac, but some of the changes you could try

[issue9025] Non-uniformity in randrange for large arguments.

2010-06-23 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Thanks guys, I've got it from here. Some considerations for the PRNG are: * equidistribution (for quality) * repeatability from the same seed (even in multithreaded environments) * quality and simplicity of API (for

[issue9048] no OS X buildbots in the stable list

2010-06-23 Thread Bill Janssen
Bill Janssen bill.jans...@gmail.com added the comment: Bit of a chicken/egg issue here. Since we haven't had OS X buildbots for very long, and the ones we do have represent odd configurations, I think it's premature to say that the port *doesn't* pass the test suite on a regular manner. I

[issue9048] no OS X buildbots in the stable list

2010-06-23 Thread Shashwat Anand
Changes by Shashwat Anand anand.shash...@gmail.com: -- nosy: +l0nwlf ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9048 ___ ___ Python-bugs-list

[issue8901] Windows registry path not ignored with -E option

2010-06-23 Thread flashk
flashk fla...@gmail.com added the comment: Any chance of getting this into 2.7 final? This fix is important for embedding Python in Windows applications. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8901

  1   2   >