Nick Coghlan <[email protected]> added the comment:
Given the complexities proposed for the dir matching, I'm shifting back to a
solid -1 on this. Trying to match multi-part directories with globs is a
nightmare and I currently don't allow it at all in walkdir. Instead, dir
filtering and file filtering are expressed separately.
In 0.4, walkdir will allow the following to search the current directory for
all Python source files in subdirectories named 'c':
walk_files(included_files=["*.py"], included_dirs="c")
This discussion does mean I plan to add path filtering though, that works on
the "dirpath" value directly (and *will* allow multi-part matches). So the
"Python source files in subdirectories named 'd' of directories named 'c'" will
be written something like:
walk_files(included_files=["*.py"], included_paths="*/c/d")
I also plan to explore options to make the pattern matching function
configurable (i.e. so you can pass in something like "match=re.search")
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue13968>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com