Password request in pycharm
I am trying to prompt the user for a password in pycharm without repeating the password in the console output.
I tried using the getpass module, but it will duplicate it. How can I do this or make getpass not echo the password in pycharm?
Here's a little digging in the code:
getpass
first tries to manipulate the tty, but it throws an exception
>>> os.open('/dev/tty', os.O_RDWR|os.O_NOCTTY)
OSError: [Errno 6] Device not configured: '/dev/tty'
Then it tries to manipulate stdin, but it also throws an exception:
>>> sys.stdin.fileno()
AttributeError: StdIn instance has no attribute 'fileno'
Does anyone know how to get the job done?
+3
source to share
No one has answered this question yet
Check out similar questions: