Author gregory.p.smith
Recipients Trundle, brian.curtin, eric.araujo, giampaolo.rodola, gregory.p.smith, loewis, neologix, nvetoshkin, pitrou, serhiy.storchaka, socketpair, terry.reedy, tim.golden, torsten
Date 2013-03-24.22:56:24
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Here's is an os.scandir(path='.') implementation that iterates reading the directory on the fly instead of pre-building a list.

os.listdir's implementation should ultimately be replaced by this as:

def listdir(path=None):
    if path is None:
        return list(os.scandir())
    return list(os.scandir(path))

Though I have not yet done that in this patch so that I could compare behavior of old vs new.

Why the scandir name?  Read the libc scandir man page.  It fits.

I have tested this on POSIX (Linux).  I don't have any ability to build Windows code so I expect that still has bugs and possibly compilation issues.  Please leave comments on the 'review' link.
Date User Action Args
2013-03-24 22:56:28gregory.p.smithsetrecipients: + gregory.p.smith, loewis, terry.reedy, pitrou, giampaolo.rodola, tim.golden, eric.araujo, Trundle, brian.curtin, torsten, nvetoshkin, neologix, socketpair, serhiy.storchaka
2013-03-24 22:56:27gregory.p.smithsetmessageid: <>
2013-03-24 22:56:27gregory.p.smithlinkissue11406 messages
2013-03-24 22:56:27gregory.p.smithcreate