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 larry
Recipients larry
Date 2011-09-05.15:11:26
SpamBayes Score 2.6042014e-06
Marked as misclassified No
Message-id <1315235547.8.0.461411196791.issue12898@psf.upfronthosting.co.za>
In-reply-to
Content
With the recent spate of POSIX *at() functions added to os, we now have a bunch of places in the API that take directory fds.  But afaict there's no way to get a directory fd in Python!  The only calls to opendir() in the tree are internal, in os.listdir() and in the import machinery.  (Though in practice most people will use AT_FDCWD anyway.)

I propose adding a new function, os.opendir(), the implementation to be much the same as (aka a hacked-up copy and paste of) os.unlink() in Modules/posixmodule.c.  I'd be happy to contribute the patch.
History
Date User Action Args
2011-09-05 15:12:27larrysetrecipients: + larry
2011-09-05 15:12:27larrysetmessageid: <1315235547.8.0.461411196791.issue12898@psf.upfronthosting.co.za>
2011-09-05 15:11:27larrylinkissue12898 messages
2011-09-05 15:11:26larrycreate