Is there a way in Python to convert characters as they are being entered by the user to asterisks, like it can be seen on many websites?
For example, if an email user was asked to sign in to their account, while typing in their password, it wouldn't appear as characters but rather as *
after each individual stroke without any time lag.
If the actual password was KermitTheFrog
, it would appear as *************
when typed in.
I am not asking about how to disable echoing characters to the screen, which is what Python's getpass.getpass()
module does. I specifically want the feature where asterisks appear in response to key presses, which getpass
doesn't do.