我已经编写了一个简单的程序来使用getpass
从命令中捕获密码,但该程序挂起了
我想抓取密码并显示出来。在
import getpass
class PasswordEnter:
def enterPassword(self):
while True:
print("--------------")
password = getpass.getpass(prompt='Enter Password: ', stream=None)
if not password:
continue
else:
print("Actual Password : ", password)
break
if __name__ == '__main__':
test = PasswordEnter();
test.enterPassword()
Pycharm不允许直接捕获密码。我们得告诉皮查姆要表现得像个终结者。以下是步骤。在
相关问题 更多 >
编程相关推荐