Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
你如何隐藏的输入raw_input?例如,我想要:
raw_input
password = raw_input("Password: ")
成为
Password: ******** #or Password: #hide the characters (i.e. no echo)
而不是显示字符串。我该怎么做?
使用getpass:
getpass
import getpass password = getpass.getpass('Password: ')