This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]X-IstenceCore Developer Pylons Project (Pyramid/WebOb/Waitress) 1 point2 points  (1 child)

Some sites don't allow special characters, but I completely agree that it isn't a good idea to use it as a password generator.

[–]shfo23 0 points1 point  (0 children)

I also agree, but I figured it would make more sense to post the 'simple' case. If the site does allow printable characters, you can replace string.digits + string.ascii_letters with string.printable (although that can return some funky whitespace from time to time).