Last active
July 3, 2016 21:28
-
-
Save konstantinfarrell/0d34f221a4cefae92275df3a1b2299d4 to your computer and use it in GitHub Desktop.
Recursive directory walk function in Python.
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
import os | |
def directory_walk(path): | |
for item in os.listdir(path): | |
if os.path.isdir(item): | |
directory_walk(item) | |
else: | |
print(item) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment