New submission from Nick Coghlan <ncogh...@gmail.com>:

I needed a depth-limited, filtered search of a directory tree recently and came 
up with the following wrapper around os.walk that brings in a few niceties like 
glob-style filtering, depth limiting and symlink traversal that is safe from 
infinite loops. It also emits a named tuple rather than the bare tuple emitted 
by os.walk:

http://code.activestate.com/recipes/577913-selective-directory-walking/

I think this would make a nice addition to 3.3 as shutil.filter_walk, but it 
need tests, documentation and reformatting as a patch before it can go anywhere.

----------
components: Library (Lib)
messages: 145999
nosy: ncoghlan
priority: normal
severity: normal
stage: test needed
status: open
title: Add shutil.filter_walk
type: feature request
versions: Python 3.3

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

Reply via email to