Jan-22-2021, 05:07 PM
(Jan-22-2021, 04:49 PM)BashBedlam Wrote: This is how I would go about it:
#getpass will hide what the person is typing during the password import getpass def new_entry(): #input the username and password and the website Website = input("Enter the website: ") Username = getpass.getuser() Password = getpass.getpass() print (Password) while True : print ('1. See the list\n2. Add new entry\n3. Exit now') choice = input ('') if choice == '1' : print ('You chose number one.\n') elif choice == '2' : new_entry() elif choice == '3' : break else: print ("ERROR:\nInvalid input: Please type agian\n")And just FYI, the lineUsername = getpass.getuser ()
is not getting input from the user it is grabbing the username of whoever is currently logged in to the computer that this is running on.
Yep thanks, noticed that and changed it.