I'm currently writing a database in python, with transitioning files, and they have all been working pretty well. My code after the login is completed is as follows:
PythonDatabase = list("/Users/*****/Desktop/PythonDatabase")
import os
flist = os.listdir(os.getcwd())
for name in PythonDatabase:
PythonDatabase[PythonDatabase.index(name)]=name[:-3]
out = open('flist.txt','w')
for name in PythonDatabase:
out.write(name+"\n")
out.close()
#------------------------------------------------------------------------------#
end = False
flist = open('flist.txt','r')
print("SECURITY PASSED")
print("ENTERING DATABASE")
def choosefile():
fcho = input("ENTER FILE CHOICE, VIEW FILE LIST, OR END: ")
if (fcho == "view file list" or fcho == "VIEW FILE LIST"):
print (flist.read())
elif (fcho == "END"):
end = True
while (end == False):
choosefile()
I blanked out my name with the *'s so you can ignore those. Most of this file is working fine, but if you see the while loop, that ignores the elif waiting for an end command. No matter how many times I give it the end command, it ignores, and continues. Help?