New submission from Larry Hastings <la...@hastings.org>: 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. ---------- components: Extension Modules messages: 143522 nosy: larry priority: normal severity: normal status: open title: add opendir() for POSIX platforms type: feature request versions: Python 3.3 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue12898> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com