Created
October 9, 2010 11:18
-
-
Save gregelin/618106 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
# http://www.daniweb.com/forums/thread126955.html | |
def processDirectory ( args, dirname, filenames ): | |
print 'Directory',dirname | |
for filename in filenames: | |
print ' File',filename | |
top_level_dir = "/usr/local" | |
os.path.walk(top_level_dir, processDirectory, None ) | |
##os.path.walk() works with a callback: processDirectory() will be | |
##called for each directory encountered. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment