Skip to content

Instantly share code, notes, and snippets.

@raincoat
Created August 30, 2012 07:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save raincoat/3523738 to your computer and use it in GitHub Desktop.
Save raincoat/3523738 to your computer and use it in GitHub Desktop.
递归遍历
def listdir(path):
for file in os.walk(path):
if os.path.isdir(file):
listdir(path + '/' + file)
print('<br/>')
else:
print('<img src =' + file + '></img>')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment