def pwd_input():
print 'password:',
chars=[]
while True:
try:
newChar=msvcrt.getch().decode('utf-8')
except:
print u'??????cmd????????????.'
return raw_input('password:')
if newChar in '\r\n':
break
elif newChar=='\b':
if chars:
del chars[-1]
msvcrt.putch('\b'.encode('utf-8')) # ??????
msvcrt.putch(' '.encode('utf-8')) # ??????
msvcrt.putch('\b'.encode('utf-8')) # ????
else:
chars.append(newChar)
msvcrt.putch('*'.encode('utf-8')) # ????
return ''.join(chars)
spiderManageSystem.py 文件源码
python
阅读 25
收藏 0
点赞 0
评论 0
评论列表
文章目录