python getpass密码输入用星号

时间:2018-02-12 11:33:30

标签: python python-2.7

如何在python中使用getpass模块输入密码时获得星号?

实际结果:

timeout()

期待结果:

import getpass                                                                       

p=getpass.getpass("Enter the Password:")

Enter the Password:

print (p)

Output: password

Python版本:2.7

0 个答案:

没有答案
相关问题