Re: [Python-Dev] os.normpath may change the meaning of the path if it contains symbolic links?

2005-12-02 Thread jepler
Consider: $ mkdir -p d/d/d $ echo 1 > d/d/a $ echo 2 > a $ ln -s d/d/d x $ python -c 'import os; print open(os.path.normpath("x/../a")).read(),' 2 $ cat x/../a 1 Jeff pgpy3c6WUgcp4.pgp Description: PGP signature ___ Pyth

Re: [Python-Dev] Proposed additional keyword argument in lo gging calls

2005-12-02 Thread skip
>> If the user doesn't need those values and can provide cheap >> substitutes, perhaps their computation can be avoided. I did that >> recently by inlining only the parts of logging.LogRecord.__init__ in >> a subclass and avoided calling logging.LogRecord.__init__ altogether.

Re: [Python-Dev] os.normpath may change the meaning of the path if itcontains symbolic links?

2005-12-02 Thread Fredrik Lundh
Nir Soffer wrote: > However, I found this alarming note in the docs: > > normpath(path) > ... > "It should be understood that this may change the meaning of the path > if it contains symbolic links!" > > The function docstring does not contain this note: > > """Normalize path, eliminating double s

[Python-Dev] os.normpath may change the meaning of the path if it contains symbolic links?

2005-12-02 Thread Nir Soffer
I'm working on My patch uses os.path.normpath to simplify the path sent to makedirs as first step. This eliminates the need to check for os.currdir or other special case, because normpath already

Re: [Python-Dev] Proposed additional keyword argument in lo gging calls

2005-12-02 Thread Vinay Sajip
> If the user doesn't need those values and can provide cheap substitutes, > perhaps their computation can be avoided. I did that recently by inlining > only the parts of logging.LogRecord.__init__ in a subclass and avoided > calling logging.LogRecord.__init__ altogether. It generated lots of > i

Re: [Python-Dev] Proposed additional keyword argument in logging calls

2005-12-02 Thread Vinay Sajip
Jim Jewett gmail.com> writes: > > > I couldn't think of a good reason why it should be possible to overwrite these > > values with values from a user-supplied dictionary, other than to spoof log > > entries in some way. The intention is to stop a user accidentally overwriting > > one of the ab

Re: [Python-Dev] Proposed additional keyword argument in lo gging calls

2005-12-02 Thread Vinay Sajip
Thomas Heller python.net> writes: > > by the logging package itself: > > > > nameName of the logger > > levelno Numeric logging level for the message (DEBUG, INFO, > > WARNING, ERROR, CRITICAL) > [and so on]. > > Shouldn't this list be documented? Or is it? T

Re: [Python-Dev] Plea to distribute debugging lib

2005-12-02 Thread David Abrahams
Trent Mick <[EMAIL PROTECTED]> writes: > [Thomas Heller wrote] >> Anyway, AFAIK, the activestate distribution contains Python debug dlls. > > [Er, a month late, but I was in flitting around Australia at the time. :)] > > Yes, as a separate download. > > ftp://ftp.activestate.com/ActivePython/e