diff --git a/convert.py b/convert.py new file mode 100644 index 0000000..9b469fa --- /dev/null +++ b/convert.py @@ -0,0 +1,7 @@ +lst = ['shit','turd','poop'] + +lst1 = dict(zip(lst, range(len(lst)))) + +print(lst1) + + diff --git a/ddbank.py b/ddbank.py index c2f6d1e..45a4e4a 100755 --- a/ddbank.py +++ b/ddbank.py @@ -1,9 +1,29 @@ #!/usr/bin/env python3 import sqlite3 import os + +def manageBankmenu(): + print('manage stuff') + +def manageBank(a): + print(a) + connDb = sqlite3.connect(a) + cur = connDb.cursor() + selectTest = cur.execute('SELECT username from ACCOUNT;') + print() + print(selectTest) + def selectBank(): - listBank() - + dirOutput = os.listdir() + matchs = [match for match in dirOutput if 'db.sqlite' in match] + #banks = dict(zip(matchs, range(len(matchs)))) + for i in matchs: + print(i.split(".")[0]) + print() + manBank = input('Choose which bank you would like to manage: ') + manBank = manBank+".db.sqlite" + manageBank(manBank) + def addBank(): bankName = input("What would you like to call this bank? ") bankName = bankName+".db.sqlite"