-
Notifications
You must be signed in to change notification settings - Fork 0
/
password_locker.py
33 lines (26 loc) · 968 Bytes
/
password_locker.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
from banners import Banners
from account import Account
class PasswordLocker:
"""Show the menu menu and store accounts."""
def __init__(self):
"""Store a banners object and an account object."""
self.banners = Banners()
self.account = Account()
def show_main_menu(self, account_list):
"""Show the main menu with the options available."""
# show the main menu banner
self.banners.show_main_menu()
# print out the available accounts
print("Accounts:")
for i in range(len(account_list)):
print(f" {i+1}.{account_list[i].title()}")
# print out the available actions
print("Actions:")
print(" a.Add Account")
print(" b.Remove Account")
print(" c.Quit")
def store_account(self):
"""Store a account for the password locker."""
print("\nEnter your information to create a Password Locker Account:\n")
self.account.username = input("Username: ")
self.account.password = input("Password: ")