Re: [Python-Dev] PEP 3144: IP Address Manipulation Library for the Python Standard Library

2009-08-25 Thread Martin v. Löwis
> ipaddr looks like a reasonable library from here, but AFAIK it's not > widely used outside of google. I don't know if it's reasonable to > want some amount public usage before a brand-new API goes into the > standard library, but such use is more likely to uncover API flaws or > quirks than a PE

Re: [Python-Dev] deleting setdefaultencoding iin site.py is evil

2009-08-25 Thread Robert Kern
On 2009-08-25 13:29 PM, Guido van Rossum wrote: On Tue, Aug 25, 2009 at 11:10 AM, Robert Kern wrote: On 2009-08-25 12:37 PM, Guido van Rossum wrote: In retrospect, it should have been called sys._setdefaultencoding(). That sends an extra signal that it's not meant for general use. Consideri

Re: [Python-Dev] deleting setdefaultencoding iin site.py is evil

2009-08-25 Thread Guido van Rossum
On Tue, Aug 25, 2009 at 11:10 AM, Robert Kern wrote: > On 2009-08-25 12:37 PM, Guido van Rossum wrote: >> >> In retrospect, it should have been called sys._setdefaultencoding(). >> That sends an extra signal that it's not meant for general use. > > Considering all of the sys._getframe() hacks out t

Re: [Python-Dev] deleting setdefaultencoding iin site.py is evil

2009-08-25 Thread Robert Kern
On 2009-08-25 12:37 PM, Guido van Rossum wrote: In retrospect, it should have been called sys._setdefaultencoding(). That sends an extra signal that it's not meant for general use. Considering all of the sys._getframe() hacks out there, I suspect that this would encourage more abuse of the fun

Re: [Python-Dev] PEP 3144: IP Address Manipulation Library for the Python Standard Library

2009-08-25 Thread Jake McGuire
On Mon, Aug 24, 2009 at 9:54 PM, Peter Moody wrote: > I personally hope that's not required; yours has been the only > dissenting email and I believe I respond to all of your major points > here. Silence is not assent. ipaddr looks like a reasonable library from here, but AFAIK it's not widely us

Re: [Python-Dev] deleting setdefaultencoding iin site.py is evil

2009-08-25 Thread Guido van Rossum
In retrospect, it should have been called sys._setdefaultencoding(). That sends an extra signal that it's not meant for general use. -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev@python.org http:

Re: [Python-Dev] deleting setdefaultencoding iin site.py is evil

2009-08-25 Thread M.-A. Lemburg
Chris Withers wrote: > Hi All, > > Would anyone object if I removed the deletion of of > sys.setdefaultencoding in site.py? > > I'm guessing "yes!" so thought I'd state my reasons now: > > This deletion appears to be pretty flimsy; reload(sys) and you have it > back. Which is lucky, because I ne

Re: [Python-Dev] Excluding the current path from module search path?

2009-08-25 Thread R. David Murray
On Tue, 25 Aug 2009 at 16:59, Chris Withers wrote: In any case, as a parting comment, http://bugs.python.org/issue1232023 seems to have been committed with no tests and the only documentation being a one liner in the NEWS.txt file. Was there other discussion of this? It probably should have go

Re: [Python-Dev] Excluding the current path from module search path?

2009-08-25 Thread Benjamin Peterson
2009/8/25 Chris Withers : > Hi All, > > I'm being bitten by this issue: > > http://bugs.python.org/issue1734860 > > I'm not sure I agree with Daniel's closing of it so thought I'd ask here... > > Am I right in thinking that the general idea is that "the current working > directory at the time of in

Re: [Python-Dev] Excluding the current path from module search path?

2009-08-25 Thread P.J. Eby
At 04:59 PM 8/25/2009 +0100, Chris Withers wrote: Hi All, I'm being bitten by this issue: http://bugs.python.org/issue1734860 I'm not sure I agree with Daniel's closing of it so thought I'd ask here... Am I right in thinking that the general idea is that "the current working directory at the

Re: [Python-Dev] deleting setdefaultencoding iin site.py is evil

2009-08-25 Thread exarkun
On 04:08 pm, ch...@simplistix.co.uk wrote: Hi All, Would anyone object if I removed the deletion of of sys.setdefaultencoding in site.py? I'm guessing "yes!" so thought I'd state my reasons now: This deletion appears to be pretty flimsy; reload(sys) and you have it back. Which is lucky, bec

[Python-Dev] deleting setdefaultencoding iin site.py is evil

2009-08-25 Thread Chris Withers
Hi All, Would anyone object if I removed the deletion of of sys.setdefaultencoding in site.py? I'm guessing "yes!" so thought I'd state my reasons now: This deletion appears to be pretty flimsy; reload(sys) and you have it back. Which is lucky, because I need it after it's been deleted...

Re: [Python-Dev] PEP 3144: IP Address Manipulation Library for the Python Standard Library

2009-08-25 Thread Peter Moody
On Fri, Aug 21, 2009 at 4:00 AM, Oleg Broytmann wrote: > http://ipaddr-py.googlecode.com/svn/branches/2.0.x/ipaddr.py > >>     _compat_has_real_bytes = bytes != str > >   Wouldn't it be nicer "bytes is not str"? it is. fixing this. Cheers, /peter > Oleg. > -- >     Oleg Broytmann            http

[Python-Dev] Excluding the current path from module search path?

2009-08-25 Thread Chris Withers
Hi All, I'm being bitten by this issue: http://bugs.python.org/issue1734860 I'm not sure I agree with Daniel's closing of it so thought I'd ask here... Am I right in thinking that the general idea is that "the current working directory at the time of invoking a script or interpreter ends up

Re: [Python-Dev] runpy.py

2009-08-25 Thread Alexander Belopolsky
Take a look at two PEPs referenced in runpy doc, http://docs.python.org/3.1/library/runpy.html : PEP 338 - Executing modules as scripts PEP written and implemented by Nick Coghlan. PEP 366 - Main module explicit relative imports PEP written and implemented by Nick Coghlan. (Nick is too modest to

Re: [Python-Dev] Problems with events in a numeric keyboard

2009-08-25 Thread Steven D'Aprano
On Wed, 26 Aug 2009 01:17:50 am Martin Zugnoni wrote: > Hi! I'm trying to catch the triple zero (000) key from a numeric > keyboard... This list is for the development *of* the Python language, not development *with* Python. You should probably try the comp.lang.python newsgroup, also available

[Python-Dev] Problems with events in a numeric keyboard

2009-08-25 Thread Martin Zugnoni
Hi! I'm trying to catch the triple zero (000) key from a numeric keyboard but, I found that it's the same id that the single zero. So, when I press the triple zero key once, I receive three events from the single zero key. I need to make a disctintion between these keys, and use them to different f

Re: [Python-Dev] runpy.py

2009-08-25 Thread Nick Coghlan
Benjamin Peterson wrote: > 2009/8/25 Chris Withers : > >> Anyway, so how is the stuff in runpy.py wired up to the command line options >> passed to the interpretter? > > Modules/main.c The most relevant functions in there are "RunMainFromImporter()" (attempting zipfile/directory execution) and "

Re: [Python-Dev] runpy.py

2009-08-25 Thread Benjamin Peterson
2009/8/25 Chris Withers : > Anyway, so how is the stuff in runpy.py wired up to the command line options > passed to the interpretter? Modules/main.c -- Regards, Benjamin ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailm

Re: [Python-Dev] runpy.py

2009-08-25 Thread Chris Withers
Benjamin Peterson wrote: 2009/8/24 Chris Withers : Guido van Rossum wrote: Anyway it looks like if someone wants to try this, only the code in runpy.py needs to be touched. Where is runpy.py to be found? $ find . -name "runpy.py" ./Lib/runpy.py Heh, grep beats Mk I eyeball ;-) (I did actua