Skip to content

Instantly share code, notes, and snippets.

@nalsi
Created November 26, 2012 19:32
Show Gist options
  • Save nalsi/4150129 to your computer and use it in GitHub Desktop.
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
## 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