Created
November 26, 2012 19:32
-
-
Save nalsi/4150129 to your computer and use it in GitHub Desktop.
Trace all the folders and the number of files in these folders in a given URL
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
## Creator: Kai Li | |
## time: 11/26/2012 | |
## Task: Trace all the folders and the number of files in these folders in a given URL. | |
import os.path as os | |
def myvisit(a, dir, files): | |
print dir, ": %d files" % len(files) | |
os.walk('c:/python27', myvisit, None) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment