Author ncoghlan
Recipients ncoghlan
Date 2011-10-20.02:05:29
SpamBayes Score 3.03493e-05
Marked as misclassified No
Message-id <>
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:

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.
Date User Action Args
2011-10-20 02:05:30ncoghlansetrecipients: + ncoghlan
2011-10-20 02:05:30ncoghlansetmessageid: <>
2011-10-20 02:05:30ncoghlanlinkissue13229 messages
2011-10-20 02:05:29ncoghlancreate