[Tutor] adding users from a script
alan.gauld@bt.com
alan.gauld@bt.com
Sun, 16 Sep 2001 23:01:02 +0100
> ugly at times - but it's the first thing halfway resembling a
> programme that I've written, so maybe all hope is not lost...
Looks pretty good for a first useful programming effort.
> # l, 0, 1 & o omitted so as not to confuse the (l)users
Since you are generating the passwords thats probably good thinking.
If the users were entering them it'd have the opposite effect
- trying to figure why certain'valid' letters were failing...
> logfile = open('passlog', 'a')
> logfile.write(nomme + "\t" + pw + "\n")
> logfile.close
Just remember to clean up the log file from time to time
- these things can grow pretty big over time. One trick
is to generate a filename from the date(passlog20010916 say),
thus you get a new file each day(or month) which makes
finding entries easy and archiving old files trivial.
Just a thought...
> " The stars go waltzing out in blue and red,
> And arbitrary blackness gallops in:
> I shut my eyes and all the world drops dead. "
>
> --Sylvia Plath
Nice taste in poetry :-)
Alan G