New submission from Larry Hastings <la...@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.

----------
assignee: larry
messages: 163886
nosy: georg.brandl, hynek, larry, pitrou
priority: normal
severity: normal
stage: needs patch
status: open
title: Support os.walk(dir_fd=) and os.fwalk(dir_fd=)
type: behavior

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue15177>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to