Skip to content

Instantly share code, notes, and snippets.

@mattdeboard
Created August 30, 2011 14:18
Show Gist options
  • Save mattdeboard/1180997 to your computer and use it in GitHub Desktop.
Save mattdeboard/1180997 to your computer and use it in GitHub Desktop.
alphanum passwd gen
import random
import string
# Taken from http://stackoverflow.com/questions/3854692/generate-password-in-python
def genpwd(length=16):
chars = string.letters + string.digits
return ''.join(choice(chars) for _ in xrange(length))
if __name__ == "__main__":
genpwd()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment