Last active
August 29, 2015 14:21
-
-
Save Dmitrii-I/afad915ac2e0fd9b1a10 to your computer and use it in GitHub Desktop.
This file contains 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
def list_files_recursively(topdir): | |
files = [] | |
topdir = os.path.expanduser(topdir) | |
for dirname, dirnames, filenames in os.walk(topdir): | |
for filename in filenames: | |
fullpath = os.path.join(dirname, filename) | |
files.append(fullpath[len(topdir)+1:]) | |
return files |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment