How to use the Python getpass.getpass in PyCharm

前端 未结 6 1164
醉话见心
醉话见心 2020-12-08 14:17

I have found getpass does not work in PyCharm. It just hangs.

In fact is seems msvcrt.getch and raw_input also don\'t work, so perhaps the issue is not with getpass

6条回答
  •  佛祖请我去吃肉
    2020-12-08 14:48

    Unfortunately, getpass() tends to fail miserably (I tested it with IDLE and PyScripter without any success on Python 3.4). I would suggest using passwordbox from easygui - it works wonderfully provided you do not use ver. 0.98 (something is messed up there), it is safe to use ver. 0.96.

    Download easygui ver. 0.96, unpack it to a temporary folder, and from that folder install it with:

    python setup.py install
    

    and use passwordbox in your program:

    from easygui import passwordbox
    password = passwordbox("PASSWORD:")
    

提交回复
热议问题