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.
我希望有人制作一个程序,要求用户输入密码,当用户在密码字段中输入密码时,密码不会以文本或数字显示。就像 linux 内核一样。(当你输入 sudo bash 或 sudo su 时)
看
http://docs.python.org/library/getpass.html
import getpass passwd = getpass.getpass()