0
當我鍵入隱藏密碼()
>>> passwd = getpass.getpass()
到Python 2.7的外殼,在空閒時,我得到的結果:
Warning (from warnings module):
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/getpass.py", line 55
passwd = fallback_getpass(prompt, stream)
GetPassWarning: Can not control echo on the terminal.
Warning: Password input may be echoed.
Password:
然後當我鍵入密碼,它並不隱藏。我需要將它發送給一個變量,所以我可以使用sha模塊對其進行SHA處理,並與'SHAed'原始數據進行比較。
你運行它在閒置? http://stackoverflow.com/questions/21264701/getpass-getpass-error-without-other-code – Dair
另外,pass是一個關鍵字。 – Dair