Re: [Python-Dev] IO module improvements

2010-02-05 Thread David Cournapeau
On Sat, Feb 6, 2010 at 4:31 PM, Tres Seaver wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Antoine Pitrou wrote: >> Pascal Chambon gmail.com> writes: >>> By the way, I'm having trouble with the "name" attribute of raw files, >>> which can be string or integer (confusing), ambiguous

Re: [Python-Dev] IO module improvements

2010-02-05 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Antoine Pitrou wrote: > Pascal Chambon gmail.com> writes: >> By the way, I'm having trouble with the "name" attribute of raw files, >> which can be string or integer (confusing), ambiguous if containing a >> relative path, and which isn't able to ha

Re: [Python-Dev] IO module improvements

2010-02-05 Thread Guido van Rossum
On Fri, Feb 5, 2010 at 3:47 PM, Christian Heimes wrote: > I had the idea to add a property that returns the file name based on the > file descriptor. However there isn't a plain way to lookup the file > based on the fd on POSIX OSes. fstat() returns only the inode and > device. The combination of

Re: [Python-Dev] IO module improvements

2010-02-05 Thread Christian Heimes
Guido van Rossum wrote: > You're right, I didn't see the OP's comma. :-) > > I don't think this can be helped though -- I really don't want open() > to be slowed down or complicated by an attempt to do path > manipulation. If this matters to the app author they should use > os.path.abspath() or os

Re: [Python-Dev] IO module improvements

2010-02-05 Thread Guido van Rossum
On Fri, Feb 5, 2010 at 8:46 AM, wrote: > On 03:57 pm, gu...@python.org wrote: >> >> On Fri, Feb 5, 2010 at 5:28 AM, Antoine Pitrou >> wrote: >>> >>> Pascal Chambon gmail.com> writes: By the way, I'm having trouble with the "name" attribute of raw files, which can be string or int

Re: [Python-Dev] Rational for PEP 3147 (PYC Respository Directories)

2010-02-05 Thread Jan Matějek
Dne 3.2.2010 18:39, Antoine Pitrou napsal(a): > Neil Schemenauer arctrix.com> writes: >> >> Thanks for doing the work of writing a PEP. The rational section >> could use some strengthing, I think. Who is benefiting from this >> feature? Is it the distribution package maintainers? Maybe people

[Python-Dev] Summary of Python tracker Issues

2010-02-05 Thread Python tracker
ACTIVITY SUMMARY (01/29/10 - 02/05/10) Python tracker at http://bugs.python.org/ To view or respond to any of the issues listed below, click on the issue number. Do NOT respond to this message. 2602 open (+38) / 17079 closed (+15) / 19681 total (+53) Open issues with patches: 1069 Average

Re: [Python-Dev] IO module improvements

2010-02-05 Thread exarkun
On 03:57 pm, gu...@python.org wrote: On Fri, Feb 5, 2010 at 5:28 AM, Antoine Pitrou wrote: Pascal Chambon gmail.com> writes: By the way, I'm having trouble with the "name" attribute of raw files, which can be string or integer (confusing), ambiguous if containing a relative path, Why is

Re: [Python-Dev] IO module improvements

2010-02-05 Thread Guido van Rossum
On Fri, Feb 5, 2010 at 5:28 AM, Antoine Pitrou wrote: > Pascal Chambon gmail.com> writes: >> >> By the way, I'm having trouble with the "name" attribute of raw files, >> which can be string or integer (confusing), ambiguous if containing a >> relative path, Why is it ambiguous? It sounds like yo

Re: [Python-Dev] IO module improvements

2010-02-05 Thread Antoine Pitrou
Pascal Chambon gmail.com> writes: > > By the way, I'm having trouble with the "name" attribute of raw files, > which can be string or integer (confusing), ambiguous if containing a > relative path, and which isn't able to handle the new case of my > library, i.e opening a file from an existing

[Python-Dev] IO module improvements

2010-02-05 Thread Pascal Chambon
Hello The new modular io system of python is awesome, but I'm running into some of its limits currently, while replacing the raw FileIO with a more advanced stream. So here are a few ideas and questions regarding the mechanisms of this IO system. Note that I'm speaking in python terms, but the

Re: [Python-Dev] PEP 3147: PYC Repository Directories

2010-02-05 Thread Nick Coghlan
Brett Cannon wrote: > If we add a new method like get_filenames(), I would suggest going > with Antoine's suggestion of a tuple for __compiled__ (allowing > loaders to indicate that they actually constructed the runtime > bytecode from multiple cached files on-disk). > > > Does code exist out the