Iterating over files of a huge directory

Evan Driscoll driscoll at
Mon Dec 17 19:40:49 CET 2012

On 12/17/2012 09:52 AM, Oscar Benjamin wrote:
> In the last couple of months there has been a lot of discussion (on
> python-list or python-dev - not sure) about creating a library to more
> efficiently iterate over the files in a directory. The result so far
> is this library on github:

This is very useful to know about; thanks.

I actually wrote something very similar on my own (I wanted to get
information about whether each directory entry was a file, directory,
symlink, etc. without separate stat() calls). I'm guessing that the
library you linked is more mature than mine (I only have a Linux
implementation at present, for instance) so I'm happy to see that I
could probably switch to something better... and even happier that it
sounds like it's aiming for inclusion in the standard library.

(Also just for the record and anyone looking for other posts, I'd guess
said discussion was on Python-dev. I don't look at even remotely
everything on python-list (there's just too much), but I do skim most
subject lines and I haven't noticed any discussion on it before now.)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 554 bytes
Desc: OpenPGP digital signature
URL: <>

More information about the Python-list mailing list