# pw.py 一个口令保管箱
import pyperclip
import sys
PASSWORDS = {'email': 'asdfihejkagwbascarevoiwera',
'blog': 'seruniobthopaesrbnesropt',
'luggage': 'asDIUrvbyialestdbhajlsnt'}
if len(sys.argv) < 2:
print('Usage: py pw.py [account] - copy account password')
sys.exit()
account = sys.argv[1]
if account in PASSWORDS:
pyperclip.copy(PASSWORDS[account])
print('Password for ' + account + ' copied to clipboard.')
else:
print('There is no account name called ' + account)
py.bat
@python pw.py %*
@pause