Skip to content

Instantly share code, notes, and snippets.

@rjzak
Created January 30, 2014 22:37
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 rjzak/8721563 to your computer and use it in GitHub Desktop.
Save rjzak/8721563 to your computer and use it in GitHub Desktop.
Ends and ends
import os
import random
import string
def recursiveDirectoryContents(dir):
for root, dirs, files in os.walk(dir):
for file in files:
yield os.path.join(root, file)
def randomString(length=10):
return ''.join([random.choice(string.ascii_letters + string.digits) for n in xrange(length)])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment