|
|
|
@ -2,17 +2,38 @@
|
|
|
|
|
import sqlite3
|
|
|
|
|
import os
|
|
|
|
|
|
|
|
|
|
def manageBankmenu():
|
|
|
|
|
print('manage stuff')
|
|
|
|
|
print('more stuff')
|
|
|
|
|
def manageBankmenu(a):
|
|
|
|
|
print("""
|
|
|
|
|
1. Add a user.
|
|
|
|
|
2. Delete a user.
|
|
|
|
|
3. List users.
|
|
|
|
|
4. Banking Menu.
|
|
|
|
|
Q to quit.
|
|
|
|
|
""")
|
|
|
|
|
while True:
|
|
|
|
|
menuOption = input("Choose from the menu: ")
|
|
|
|
|
if menuOption == '1':
|
|
|
|
|
print('Add a user')
|
|
|
|
|
elif menuOption == '2':
|
|
|
|
|
print('delete a user')
|
|
|
|
|
elif menuOption == '3':
|
|
|
|
|
print('list users')
|
|
|
|
|
elif menuOption == '4':
|
|
|
|
|
print('banking menu')
|
|
|
|
|
elif menuOption == 'q' or menuOption == 'Q':
|
|
|
|
|
break
|
|
|
|
|
else:
|
|
|
|
|
print('*** Option not understood. Please try again.')
|
|
|
|
|
|
|
|
|
|
def manageBank(a):
|
|
|
|
|
print(a)
|
|
|
|
|
connDb = sqlite3.connect(a)
|
|
|
|
|
cur = connDb.cursor()
|
|
|
|
|
selectTest = cur.execute('SELECT username from ACCOUNT;')
|
|
|
|
|
def manageBank():
|
|
|
|
|
print()
|
|
|
|
|
#connDb = sqlite3.connect()
|
|
|
|
|
#cur = connDb.cursor()
|
|
|
|
|
#cur.execute('SELECT username from ACCOUNT;')
|
|
|
|
|
fmt = "{0}"
|
|
|
|
|
#for row in cur.fetchall():
|
|
|
|
|
# print(fmt.format(*row))
|
|
|
|
|
print()
|
|
|
|
|
print(selectTest)
|
|
|
|
|
|
|
|
|
|
def selectBank():
|
|
|
|
|
dirOutput = os.listdir()
|
|
|
|
@ -23,7 +44,7 @@ def selectBank():
|
|
|
|
|
print()
|
|
|
|
|
manBank = input('Choose which bank you would like to manage: ')
|
|
|
|
|
manBank = manBank+".db.sqlite"
|
|
|
|
|
manageBank(manBank)
|
|
|
|
|
manageBankmenu(manBank)
|
|
|
|
|
|
|
|
|
|
def addBank():
|
|
|
|
|
bankName = input("What would you like to call this bank? ")
|
|
|
|
|