def __init__(self): ''' ___DESCRIPTION________________________________________________________ Initialize parameters and create gui application. ''' self.Obj = {'Module': 'dav', 'Function': '__init__'} # Initialization of application: self.app = QtGui.QApplication([]) # Loading of UI that was constructed in Qt designer: self.UI = ui.Ui_MainWindow() # Creation of application's main window: self.AMW = appMainWindow.appMainWindow(self.UI) # Console class initialization: self.cns = console.console(Verb=3) # Console messages will be printed in Tedt_Console widget: self.cns.SetGuiTedt(self.UI.Tedt_Console) # Console error and warning messages will be showed # in special modal window, that is created by call: self.cns.SetGuiWgt(self.AMW) # Set main signals in application: self.Set_AppInteractions() # Create data (Initialization of data class): self.Create_Data() # Create graphs Initialization of graphs classes): self.Create_Graphs() # Max number of graphs in one tab: self.GrFigMax = 10
def cmd(self, command, wait=False): try : self.c.onecmd(command) except AttributeError: loader().do_load(self.modPath) self.c = console(DEBUG = self.debug, VERBOSITY = self.verbosity) self.c.onecmd(command, wait)
def cmd(self, command): try : self.c.onecmd(command) except AttributeError: loader().do_load(self.modPath) self.c = console() self.c.onecmd(command)
def launch(self): if self.type == "gui": self.g = gui() self.g.launch(self.modPath) if self.type == "console": try : self.c.cmdloop() except AttributeError: loader().do_load(self.modPath) self.c = console() self.c.cmdloop()
def launch(self): if self.type == "gui": self.g = gui(self.debug) try: self.c self.g.launch() except AttributeError: self.g.launch(self.modPath) if self.type == "console": try : self.c.cmdloop() except AttributeError: loader().do_load(self.modPath) self.c = console(DEBUG = self.debug, VERBOSITY = self.verbosity) self.c.cmdloop()
from Book.Book import Book from client.client import client from rental.rental import rental from repository.repository import repository from tests.tests import tests from business.business import business from console.console import console from validation.validation import validation bookRepo = repository() clientRepo = repository() rentalRepo = repository() valid = validation() bookList = business(bookRepo, valid) clientList = business(clientRepo, valid) rentalList = business(rentalRepo, valid) console = console(bookList, clientList, rentalList) t = tests() t.testModels() t.testRepository() #t.testBusiness() console.run()