[New-bugs-announce] [issue15177] Support os.walk(dir_fd=) and os.fwalk(dir_fd=)
report at bugs.python.org
Mon Jun 25 06:13:22 CEST 2012
New submission from Larry Hastings <larry at hastings.org>:
Consider: should os.fwalk() support dir_fd? I think so. In fact, in retrospect it seems like a bug that os.fwalk *doesn't* already support this.
Georg: is this a feature or a bugfix?
(Wish I'd thought of this Saturday!)
I actually did a little experimenting, and got os.fwalk(fd) to work with very little trouble. os.walk(fd) is harder because the recursive step appends a string to the existing path, and it really needs to be relative to the fd, and there's no way to pass both of those at once with the current signature. It's doable but it would require a separate function for the recursive step that accepted a dir_fd anyway.
nosy: georg.brandl, hynek, larry, pitrou
stage: needs patch
title: Support os.walk(dir_fd=) and os.fwalk(dir_fd=)
Python tracker <report at bugs.python.org>
More information about the New-bugs-announce