Last active
March 20, 2019 19:41
-
-
Save elena-roff/5884b0010d5383f884591c84fea2c7c0 to your computer and use it in GitHub Desktop.
Find files recursively
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import globt | |
# if you need a list, just use glob.glob instead of glob.iglob | |
for filename in glob.iglob('src/**/*.c', recursive=True): | |
pprint(filename) | |
# ----- OR ----- | |
from pathlib import Path | |
# generic path | |
p = Path(path).expanduser() | |
data_path = p.glob('**/<name>-*') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment