[issue13229] Add shutil.filter_walk

2011-11-05 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: During the discussion about adding a chowntree function to shutil (http://mail.python.org/pipermail/python-dev/2011-May/111661.html and ), Victor suggested this: I don't like the idea of a recursive flag. I would prefer a map-like function

[issue13229] Add shutil.filter_walk

2011-11-05 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: s/and /and #13033/ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13229 ___ ___

[issue13229] Add shutil.filter_walk

2011-11-05 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: I should probably update that posted recipe to my latest version (which adds excluded_files and excluded_dirs parameters). However, since I've been dealing with remote filesystems where os.listdir() and os.stat() calls from the local machine

[issue13229] Add shutil.filter_walk

2011-11-05 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: This needs more thought - pypi package coming soon :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13229 ___

[issue13229] Add shutil.filter_walk

2011-11-05 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Nick, perhaps you want to have a look at http://hg.python.org/features/pathlib/ (it doesn't have a filter_walk equivalent but it could grow one :-)) -- nosy: +pitrou ___ Python tracker

[issue13229] Add shutil.filter_walk

2011-11-05 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: That's one of the nicer attempts I've seen at an object-oriented path library, but I have a core problem with OOP path APIs, and it relates to the Unicode encoding/decoding problem: the ultimate purpose of path objects is almost always to

[issue13229] Add shutil.filter_walk

2011-11-05 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: Initial version available at: https://bitbucket.org/ncoghlan/iterwalk/src I'll get it published to PyPI once the test suite is in a slightly better state (no filesystem based tests as yet). -- ___

[issue13229] Add shutil.filter_walk

2011-10-21 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13229 ___ ___ Python-bugs-list

[issue13229] Add shutil.filter_walk

2011-10-19 Thread Nick Coghlan
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