[Python-ideas] os.listdir iteration support
Giampaolo Rodola'
gnewsg at gmail.com
Thu Nov 22 22:04:05 CET 2007
Hi to all,
I would find very useful having a version of os.listdir returning a
generator.
If a directory has many files, say 20,000, it could take a long time
getting all of them with os.listdir and this could be a problem in
asynchronous environments (e.g. asynchronous servers).
The only solution which comes to my mind in such case is using a
thread/fork or having a non-blocking version of listdir() returning an
iterator.
What do you think about that?
More information about the Python-ideas
mailing list