Reputation: 3272
In C/C++ if you want to enter a character without anything being printed on the screen, you can use getch(). Is there any way I can do this in python?
Upvotes: 1
Views: 467
Reputation: 49318
With getpass.getpass()
, which is intended for getting passwords:
>>> import getpass
>>> a = getpass.getpass()
Password:
>>> a
'asdf'
Upvotes: 1