Message152990
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") |
|
Date |
User |
Action |
Args |
2012-02-09 22:12:42 | ncoghlan | set | recipients:
+ ncoghlan, pitrou, giampaolo.rodola, eric.araujo, r.david.murray, eli.bendersky, ubershmekel |
2012-02-09 22:12:42 | ncoghlan | set | messageid: <1328825562.58.0.703388057948.issue13968@psf.upfronthosting.co.za> |
2012-02-09 22:12:41 | ncoghlan | link | issue13968 messages |
2012-02-09 22:12:41 | ncoghlan | create | |
|