Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def login():
- print("Please enter the following below.\n")
- user = input("Username: ")
- passw = input("\nPassword: ")
- f = open("users.txt", "r")
- for line in f.readlines():
- us, pw = line.strip().split("|")
- if (user in us) and (passw in pw):
- time.sleep(1)
- print ("\nLogin successful!\n")
- time.sleep(0.5)
- print ("***************************************************************************************\n")
- menu()
- return True
- time.sleep(1)
- print ("\nWrong username/password\n")
- time.sleep(0.5)
- print ("***************************************************************************************\n")
- return False
- def signup():
- stringToSave = input("Enter your username and password like so... NAME|PASS : ")
- file_name = "users.txt"
- myFile = open("users.txt", 'a')
- myFile.write(stringToSave + '\n')
- myFile.close()
- time.sleep(2)
- print("Your account as been successfully created!\n")
- time.sleep(2)
- print ("***************************************************************************************\n")
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement