login6
Four versions after login2, this program ended up getting a lot shorter. Proof that it is possible to code features out of a program. This one, like the previous versions, also dates back to 2004-2005.
while 1: un = raw_input('Enter User Name :') if un == 'nu': cp = raw_input('Create new User? :') if cp == 'y': nu = raw_input('Type new User Name :') cps = open(nu + 'usernames', 'w') cps.write("") cps.write(nu) cps.close() np = raw_input('Type new Password :') cps = open(nu + 'pwd', 'w') cps.write("") cps.write(np) cps.close() login = open(un + 'usernames', 'r') oldun = login.readline() if un == "": break if un == "stop": break if un == oldun: pw = raw_input('Enter Password :') login2 = open(un + 'pwd', 'r') oldpw = login2.readline() if oldpw == pw: print "Hello"