Beispiel #1
0
#!/usr/bin/env python

import sys
sys.path.append("..") # Adds higher directory to python modules path.

import curses
from base_screen import BaseScreen
from login import LogIn
from commandSQL import CommandSQL
import dialogSQL


x = LogIn("Welcome to nCursy mySQL")
connection = x.JJTestLogin()
x.helpMenu()
x.menu.getch()
curses.endwin()
#the above line has ended login screen instance

### HOW ARE WE CHECKING IF USER HAS ACTUALLY
#LOGGED IN. Should have some kind of loop that
#sends them back if login failed, and maybe have
#a quit option if they can't seem to log in.

#We now need a new screen instance to continue
#if the user sucessfully logs in
x = BaseScreen("SQL Command View")
x.helpMenu()

#Just testing manually entered SQL commands here
y = CommandSQL(connection)