I've been trying to make a simple sign-up/in program and I wanted to hide the password, so I took to the internet.
I tried out this thing called getpass, but it didn't work. It just told me it couldn't change the echo in IDLE's shell.(I use IDLE Python 3.6 on Windows 10 btw)
So I was wondering if there's a way to hide the input without getpass, or to encrypt it some other way?
Here's the code:
class Account:
def __init__(self, un, pw):
self.un = un
self.pw = pw
accounts = []
#account signing up
def signup():
usernm = input("Make a username >>> ")
passwd = input("Make a password >>> ")
accounts.append(Account(usernm, passwd))
def signin():
inun = input("Username? >>> ")
inpw = input("Password >>> ")
for account in accounts:
if account.un == inun:
if account.pw == inpw:
print("Signed in!")
option = input("Sign [i]n or sign [u]p? >>> ").lower()
if option == "i":
signin()
if option == "u":
signup()
Thanks :)