Created
August 30, 2011 14:18
-
-
Save mattdeboard/1180997 to your computer and use it in GitHub Desktop.
alphanum passwd gen
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
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