保存密码到 password中, 输入对应的参数 ,可以直接拿到密码
#coding:utf-8 passwords = { 'email':'asdasxxasdfadasdf', 'blog':'azzxcvzcvzaaa', 'baidu':'zcvasdfadfaf', 'youku':'azcaaszxcvzcvzv' } import sys if(len(sys.argv)<2): print "参数个数不得少于2个".decode("utf-8").encode("GBK") sys.exit() #账户参数 account = sys.argv[1] import pyperclip if account in passwords.keys(): passKey = passwords[account] print ("密码为:"+passKey).decode("utf-8").encode("GBK") pyperclip.copy(passKey) else: print("没有找到密码").decode("utf-8").encode("GBK")
0则评论给“python 密码记事本项目”