|
|
|
@ -10,9 +10,19 @@ def deluser(a):
|
|
|
|
|
connDb.commit()
|
|
|
|
|
connDb.close()
|
|
|
|
|
|
|
|
|
|
def listuser():
|
|
|
|
|
print("needs code")
|
|
|
|
|
|
|
|
|
|
def listuser(a):
|
|
|
|
|
connDb = sqlite3.connect(a)
|
|
|
|
|
cur = connDb.cursor()
|
|
|
|
|
userQuery = cur.execute("SELECT username FROM account;")
|
|
|
|
|
userQuery = cur.fetchone()
|
|
|
|
|
connDb.close()
|
|
|
|
|
matchs = userQuery
|
|
|
|
|
print()
|
|
|
|
|
print("User list: ")
|
|
|
|
|
print("__________________________")
|
|
|
|
|
for i in matchs:
|
|
|
|
|
print(i.split(".")[0])
|
|
|
|
|
print("__________________________")
|
|
|
|
|
|
|
|
|
|
def addUser(a):
|
|
|
|
|
connDb = sqlite3.connect(a)
|
|
|
|
@ -39,7 +49,7 @@ def manageBankmenu(a):
|
|
|
|
|
elif menuOption == '2':
|
|
|
|
|
deluser(a)
|
|
|
|
|
elif menuOption == '3':
|
|
|
|
|
print('list users')
|
|
|
|
|
listuser(a)
|
|
|
|
|
elif menuOption == '4':
|
|
|
|
|
print('banking menu')
|
|
|
|
|
elif menuOption == 'q' or menuOption == 'Q':
|
|
|
|
@ -95,8 +105,10 @@ def listBank():
|
|
|
|
|
matchs = [match for match in dirOutput if 'db.sqlite' in match]
|
|
|
|
|
print()
|
|
|
|
|
print('Banks found: ')
|
|
|
|
|
print("__________________________")
|
|
|
|
|
for i in matchs:
|
|
|
|
|
print(i.split(".")[0])
|
|
|
|
|
print("__________________________")
|
|
|
|
|
|
|
|
|
|
while True:
|
|
|
|
|
print("""
|
|
|
|
|