[New-bugs-announce] [issue12898] add opendir() for POSIX platforms

Larry Hastings report at bugs.python.org
Mon Sep 5 17:12:27 CEST 2011


New submission from Larry Hastings <larry at 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 <report at bugs.python.org>
<http://bugs.python.org/issue12898>
_______________________________________


More information about the New-bugs-announce mailing list