spiderManageSystem.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:GraduateSystem 作者: FanhuaandLuomu 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号