交互提示输入用户密码的python脚本:
vi a1.py
#!/usr/bin/python
while True:
input = raw_input('Please input your username:')
if input == "aa":
password = raw_input('Please input your pass:')
p = '123456'
while password != p:
password = raw_input('Please input your pass again:')
if password == p:
print 'welcome to system!'
break
:wq