This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pitrou
Recipients larry, pitrou, rosslagerwall
Date 2011-09-05.16:16:26
SpamBayes Score 0.024290519
Marked as misclassified No
Message-id <1315239387.02.0.467337332768.issue12898@psf.upfronthosting.co.za>
In-reply-to
Content
> I was proposing adding a function to open directory fds, because 
> there isn't one; fdlistdir(), like many other POSIX functions 
> available in Python, consumes directory fds.

I don't think I understand. This already works:

>>> fd = os.open("Misc", os.O_RDONLY)
>>> os.fdlistdir(fd)
['python.pc', 'README.coverity', 'ACKS.orig', 'NEWS.orig', 'HISTORY', 'python.man', 'valgrind-python.supp', 'TextMate', 'python-config.in', 'NEWS', 'RPM', 'vgrindefs', 'svnmap.txt', 'python-wing4.wpr', 'gdbinit', 'build.sh', 'README.AIX', 'Vim', 'SpecialBuilds.txt', 'indent.pro', 'python-wing3.wpr', 'ACKS', 'README', 'README.valgrind', 'Porting', 'python.pc.in']

Is there anything you want to do on a "directory fd" except listing its contents?
History
Date User Action Args
2011-09-05 16:16:27pitrousetrecipients: + pitrou, larry, rosslagerwall
2011-09-05 16:16:27pitrousetmessageid: <1315239387.02.0.467337332768.issue12898@psf.upfronthosting.co.za>
2011-09-05 16:16:26pitroulinkissue12898 messages
2011-09-05 16:16:26pitroucreate