[Tutor] Convert os.random output to a string

2014-03-06 Thread Jay Lozier
Hi, My first question I am try to generate random password strings of an arbitrary user selected length. I read to generate a random string of a user supplied length I can use os.urandom(n). I want to convert the output to a human readable string. I would like to store the string for later

Re: [Tutor] Convert os.random output to a string

2014-03-06 Thread Ben Finney
Jay Lozier jsloz...@gmail.com writes: I am try to generate random password strings of an arbitrary user selected length. My first recommendation would be: Don't re-invent the wheel. Generating password strings is a complex request, not because it's particularly difficult but because the

Re: [Tutor] Convert os.random output to a string

2014-03-06 Thread Alan Gauld
On 06/03/14 23:32, Jay Lozier wrote: I am try to generate random password strings of an arbitrary user selected length. I read to generate a random string of a user supplied length I can use os.urandom(n). So far so good... I want to convert the output to a human readable string. Define

Re: [Tutor] Convert os.random output to a string

2014-03-06 Thread Jay Lozier
Alan I am planning to store the passwords encrypted. This part is allow a user to generate and view the generated password. Ben got me pointed to a snippet I can use. I was trying to do something the hard way. Jay On 03/06/2014 07:34 PM, Alan Gauld wrote: On 06/03/14 23:32, Jay Lozier