python的pwd库请问怎么下载安装?找了很长时间都没找到。

Python015

python的pwd库请问怎么下载安装?找了很长时间都没找到。,第1张

安装在python上的模块,可以用pip或者执行setup.py来安装 如果你是用pip安装的,可以直接使用pip uninstall 模块名 如果是用python setup.py install安装,使用python setup.py uninstall来卸载 或者用最暴力的方法: python的模块安装在python...

#coding:utf-8

import msvcrt, sys

def pwd_input():

chars = []

while True:

newChar = msvcrt.getch()

if newChar in '\r\n': # 如果是换行,则输入结束

print ''

break

elif newChar == '\b': # 如果是退格,则删除末尾一位

if chars:

del chars[-1]

sys.stdout.write('\b \b') # 删除一个星号

else:

chars.append(newChar)

sys.stdout.write('*') # 显示为星号

print ''.join(chars)

pwd = pwd_input()

print pwd