Python getpass.getpass() function call hangs

后端 未结 5 1062
广开言路
广开言路 2021-01-06 01:10

I am trying to get a prompt that will ask for my password but when I try to call getpass.getpass() it just freezes. I am running on Windows 7 64 bit using Pytho

5条回答
  •  感动是毒
    2021-01-06 01:35

    Python "effectively freezes because it can't receive the input from standard input". See https://support.enthought.com/entries/22157050-Canopy-Python-prompt-QtConsole-Can-t-run-getpass-or-interactive-OS-shell-commands-or-Windows-process

    The fix is to use a different interpreter. I switched to IDLE and fixed the issue.

提交回复
热议问题