Re: [Python-3000] Removal of os.path.walk

2008-05-09 Thread Humberto Diogenes
On 09/05/2008, at 04:45, Humberto Diogenes wrote: I noticed you've already removed os.path.walk in r62909, but there are still some references to it in the code, as I noticed issuing a `make altinstall` on a Mac: AttributeError: 'module' object has no attribute 'walk' Here's the fix fo

Re: [Python-3000] Removal of os.path.walk

2008-05-09 Thread Humberto Diogenes
On 08/05/2008, at 00:12, Guido van Rossum wrote: On Wed, May 7, 2008 at 7:21 PM, Benjamin Peterson <[EMAIL PROTECTED]> wrote: Can I go ahead and remove this then? Yes, but let's do it after Barry has released the alphas. -- --Guido van Rossum (home page: http://www.python.org/~guido/)

Re: [Python-3000] Removal of os.path.walk

2008-05-07 Thread Guido van Rossum
On Wed, May 7, 2008 at 7:21 PM, Benjamin Peterson <[EMAIL PROTECTED]> wrote: > Can I go ahead and remove this then? Yes, but let's do it after Barry has released the alphas. > > > It seems that os.walk has more options and a cleaner interface to > > > walking trees than os.path.walk does. I

Re: [Python-3000] Removal of os.path.walk

2008-05-07 Thread Benjamin Peterson
Can I go ahead and remove this then? > > > It seems that os.walk has more options and a cleaner interface to > > walking trees than os.path.walk does. Is there support for the removal > > this in Py3k? > > > > -- > > Cheers, > > Benjamin Peterson -- Cheers, Benjamin Peterson "The

Re: [Python-3000] Removal of os.path.walk

2008-05-06 Thread Giovanni Bajo
On Thu, 01 May 2008 08:58:22 -0700, Guido van Rossum wrote: > On Thu, May 1, 2008 at 3:20 AM, Nick Coghlan <[EMAIL PROTECTED]> wrote: >> I think Giovanni's point is an important one as well - with an >> iterator, >> you can pipeline your operations far more efficiently, since you don't >> have t

Re: [Python-3000] Removal of os.path.walk

2008-05-06 Thread Mike Meyer
On Wed, 30 Apr 2008 08:02:28 -0700 "Guido van Rossum" <[EMAIL PROTECTED]> wrote: > On Wed, Apr 30, 2008 at 7:48 AM, Aahz <[EMAIL PROTECTED]> wrote: > > > > On Tue, Apr 29, 2008, Guido van Rossum wrote: > > > On Tue, Apr 29, 2008 at 8:10 PM, Tim Heaney <[EMAIL PROTECTED]> wrote: > > >> > > >> Sp

Re: [Python-3000] Removal of os.path.walk

2008-05-06 Thread Giampaolo Rodola'
On 30 Apr, 11:27, Greg Ewing <[EMAIL PROTECTED]> wrote: > Tim Heaney wrote: > > Speaking of this, is it too late to lobby for an iterator version of > > os.listdir? (Perhaps listdir would not be the best name. :) > > There was discussion about an opendir() function a while > back that would return

Re: [Python-3000] Removal of os.path.walk

2008-05-01 Thread Aahz
On Thu, May 01, 2008, Guido van Rossum wrote: > On Thu, May 1, 2008 at 7:25 AM, Aahz <[EMAIL PROTECTED]> wrote: >> >> Actually, the primary application I'm thinking of is a CGI that displays >> part of a directory listing (paged) for manual processing of individual >> files. > > But wouldn't yo

Re: [Python-3000] Removal of os.path.walk

2008-05-01 Thread Guido van Rossum
On Thu, May 1, 2008 at 3:20 AM, Nick Coghlan <[EMAIL PROTECTED]> wrote: > I think Giovanni's point is an important one as well - with an iterator, > you can pipeline your operations far more efficiently, since you don't have > to wait for the whole directory listing before doing anything (e.g. if

Re: [Python-3000] Removal of os.path.walk

2008-05-01 Thread Guido van Rossum
On Thu, May 1, 2008 at 7:25 AM, Aahz <[EMAIL PROTECTED]> wrote: > Actually, the primary application I'm thinking of is a CGI that displays > part of a directory listing (paged) for manual processing of individual > files. But wouldn't you usually want the listing sorted, while os.listdir() does

Re: [Python-3000] Removal of os.path.walk

2008-05-01 Thread Aahz
On Thu, May 01, 2008, "Martin v. L?wis" wrote: > Guido van Rossum wrote: >> >> There is one use case I can see for an iterator-version of >> os.listdir() (to be named os.opendir()): when globbing a huge >> directory looking for a certain pattern. Using os.listdir() you end up >> needed enough memor

Re: [Python-3000] Removal of os.path.walk

2008-05-01 Thread Nick Coghlan
Martin v. Löwis wrote: Guido van Rossum wrote: There is one use case I can see for an iterator-version of os.listdir() (to be named os.opendir()): when globbing a huge directory looking for a certain pattern. Using os.listdir() you end up needed enough memory to hold all of the names at once. Us

Re: [Python-3000] Removal of os.path.walk

2008-04-30 Thread Martin v. Löwis
Guido van Rossum wrote: > There is one use case I can see for an iterator-version of > os.listdir() (to be named os.opendir()): when globbing a huge > directory looking for a certain pattern. Using os.listdir() you end up > needed enough memory to hold all of the names at once. Using > os.opendir()

Re: [Python-3000] Removal of os.path.walk

2008-04-30 Thread Giovanni Bajo
On Wed, 30 Apr 2008 16:02:31 -0700, Guido van Rossum wrote: > There is one use case I can see for an iterator-version of os.listdir() > (to be named os.opendir()): when globbing a huge directory looking for a > certain pattern. Using os.listdir() you end up needed enough memory to > hold all of th

Re: [Python-3000] Removal of os.path.walk

2008-04-30 Thread Guido van Rossum
There is one use case I can see for an iterator-version of os.listdir() (to be named os.opendir()): when globbing a huge directory looking for a certain pattern. Using os.listdir() you end up needed enough memory to hold all of the names at once. Using os.opendir() you would need only enough memory

Re: [Python-3000] Removal of os.path.walk

2008-04-30 Thread Martin v. Löwis
> There's a big difference between "not enough memory" and "directory > consumes lots of memory". My company has some directories with several > hundred thousand entries, so using an iterator would be appreciated > (although by the time we upgrade to Python 3.x, we probably will have > fixed that

Re: [Python-3000] Removal of os.path.walk

2008-04-30 Thread Guido van Rossum
On Wed, Apr 30, 2008 at 7:48 AM, Aahz <[EMAIL PROTECTED]> wrote: > > On Tue, Apr 29, 2008, Guido van Rossum wrote: > > On Tue, Apr 29, 2008 at 8:10 PM, Tim Heaney <[EMAIL PROTECTED]> wrote: > >> > >> Speaking of this, is it too late to lobby for an iterator version of > >> os.listdir? (Perhaps

Re: [Python-3000] Removal of os.path.walk

2008-04-30 Thread Aahz
On Tue, Apr 29, 2008, Guido van Rossum wrote: > On Tue, Apr 29, 2008 at 8:10 PM, Tim Heaney <[EMAIL PROTECTED]> wrote: >> >> Speaking of this, is it too late to lobby for an iterator version of >> os.listdir? (Perhaps listdir would not be the best name. :) >> >> There is one at >> >> http://wxi

Re: [Python-3000] Removal of os.path.walk

2008-04-30 Thread Greg Ewing
Martin v. Löwis wrote: Still, Guido's question stands: do you have an actual use case where you would want to stop earlier? It just seems a bit disappointing to me that the underlying OS has the ability to read directories an item at a time, but this is not made available to the Python programm

Re: [Python-3000] Removal of os.path.walk

2008-04-30 Thread Greg Ewing
Tim Heaney wrote: Speaking of this, is it too late to lobby for an iterator version of os.listdir? (Perhaps listdir would not be the best name. :) There was discussion about an opendir() function a while back that would return an iterable, but I don't think anything came of it. -- Greg ___

Re: [Python-3000] Removal of os.path.walk

2008-04-30 Thread Martin v. Löwis
> I don't know how compelling it is, but the dirread Plan 9 call to get > a directory listing > (http://plan9.bell-labs.com/magic/man2html/2/dirread) returns only a > subset of the entries in the directory so it effectively acts as an > iterator. All operating system APIs to read directories work

Re: [Python-3000] Removal of os.path.walk

2008-04-30 Thread John Barham
On Tue, Apr 29, 2008 at 8:42 PM, Guido van Rossum <[EMAIL PROTECTED]> wrote: > On Tue, Apr 29, 2008 at 8:10 PM, Tim Heaney <[EMAIL PROTECTED]> wrote: > > Speaking of this, is it too late to lobby for an iterator version of > > os.listdir? (Perhaps listdir would not be the best name. :) > > > >

Re: [Python-3000] Removal of os.path.walk

2008-04-29 Thread Guido van Rossum
On Tue, Apr 29, 2008 at 8:10 PM, Tim Heaney <[EMAIL PROTECTED]> wrote: > Speaking of this, is it too late to lobby for an iterator version of > os.listdir? (Perhaps listdir would not be the best name. :) > > There is one at > > http://wxidle.sourceforge.net/projects/xlistdir/ > > but I think i

[Python-3000] Removal of os.path.walk

2008-04-29 Thread Tim Heaney
Speaking of this, is it too late to lobby for an iterator version of os.listdir? (Perhaps listdir would not be the best name. :) There is one at http://wxidle.sourceforge.net/projects/xlistdir/ but I think it ought to be in the standard library. Moreover, if we had such a thing, shouldn't os.w

Re: [Python-3000] Removal of os.path.walk

2008-04-29 Thread Facundo Batista
2008/4/28, Benjamin Peterson <[EMAIL PROTECTED]>: > It seems that os.walk has more options and a cleaner interface to > walking trees than os.path.walk does. Is there support for the removal > this in Py3k? +1 -- .Facundo Blog: http://www.taniquetil.com.ar/plog/ PyAr: http://www.python.o

Re: [Python-3000] Removal of os.path.walk

2008-04-29 Thread Guido van Rossum
+1 On 4/28/08, Benjamin Peterson <[EMAIL PROTECTED]> wrote: > It seems that os.walk has more options and a cleaner interface to > walking trees than os.path.walk does. Is there support for the removal > this in Py3k? > > -- > Cheers, > Benjamin Peterson > __

[Python-3000] Removal of os.path.walk

2008-04-28 Thread Benjamin Peterson
It seems that os.walk has more options and a cleaner interface to walking trees than os.path.walk does. Is there support for the removal this in Py3k? -- Cheers, Benjamin Peterson ___ Python-3000 mailing list Python-3000@python.org http://mail.python.or