Created
May 9, 2014 15:10
-
-
Save vsudilov/bc5ad3d64fa7187c4783 to your computer and use it in GitHub Desktop.
Recursive find filename without glob (python)
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 fnmatch | |
| #import os | |
| matches = [] | |
| for root, dirnames, filenames in os.walk('/path/'): | |
| for filename in fnmatch.filter(filenames, '*.py'): | |
| matches.append(os.path.join(root, filename)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment