I'm doing a basic coding project for class. It's the password locker from "Automate the Boring Stuff".
I have everything coded properly, compiled without errors and I've made the bat file and it's in the right spot.
This is the code (minus the dashes in front of the hashtags)
#! python3
#pw.py This is an insecure Password Locker.
PASSWORDS = {'yahooEmail':'12345', 'googleEmail':'23456','facebook':'34567', 'luggage':'45678'}
import sys, pyperclip
if len(sys.argv) < 2:
print('Usage: py pw.py [account] - copy account password')
sys.exit()
account = sys.argv[1] # first command line arg is the account name
if account in PASSWORDS:
pyperclip.copy(PASSWORDS[acount])
print('Password for ' + account + ' copied to clipboard.')
else:
print('There is no account named ' + account +'.')
So it should, of course, just allow me to type in the key to see the value, and copy/past new values as needed.
But when I run it I get this:
Traceback (most recent call last):
File "C:\Users\shawn\Desktop\Python homework\pw.py", line 6, in <module>
import sys, pyperclip
ModuleNotFoundError: No module named 'pyperclip'