Please add recursive mode to "wcmatch.glob"
S: invalid
Given this directory structure ...
```
$ find bla -type f -print
bla/4.txt
bla/1/a.txt
bla/1/2/3/c.txt
bla/1/2/b.txt
```
... I can get the default Python `glob` module to find all `*.txt` files by using recursive mode:
```
$ python3 -c "import glob; print(list(glob.glob('bla/**/*.txt')))"
['bla/1/a.txt']
$ python3 -c "import glob; print(list(glob.glob('bla/**/*.txt', recursive=True)))"
['bla/4.txt', 'bla/1/a.txt', 'bla/1/2/b.txt', 'bla/1/2/3/c.txt']
```
Unfortunately `glob.glob` can only be used on an actual directory and not on in-memory data.
It would therefore be very useful if `wcmatch.glob` would also provide a recursive mode.
关闭于 2025-09-25 2 条评论