Beispiel #1
0
from WelcomeScreen import WelcomeScreen
from TableScreen import TableScreen
from ExportScreen import ExportScreen
from Popup import Popup
from Menu import Menu
import base_dialog
import dialogSQL
import base_commands
import commandSQL

connected = False
connection = None
while not connected:

    screen = LogIn("Welcome to nCursy mySQL")
    result = screen.authenticate()
    if result[0] == True:
        connected = True
        connection = result[1]

    else:
        #I think here should be a function that handles the various errors
        #by calling a Popup with the appropriate message
        #For example, 1045 is username/password not good
        #The error message is in result[1]
        Popup("There was an error logging in").anyKey()
        
screen = WelcomeScreen()
database_name = screen.run(connection)       #WelcomeScreen.run() returns a string of a database to use

while connected: