def __init__(self): #create gui component self.window = M.Main() self.window.show() #create nao module self.robot = robot.Robot() #set signals self.set_signals()
def main(): """ Main method responsible for developing the main objects used during runtime like the BaseStation and Main objects. """ # Define Queue data structures in order to communicate between threads. to_GUI = Queue() to_BS = Queue() # Create a BS (base station) and GUI object thread. threaded_bs = BaseStation(to_BS, to_GUI) threaded_bs.start() # Create main GUI object gui = Main(to_GUI, to_BS)
def main(): """ Main method responsible for developing the main objects used during runtime like the BaseStation and Main objects. """ # Define Queue data structures in order to communicate between threads. to_GUI = Queue() to_BS = Queue() # Create a BS (base station) and GUI object thread. try: threaded_bs = BaseStation(to_BS, to_GUI) threaded_bs.start() except: print("[MAIN] Base Station initialization failed. Closing...") sys.exit() # Create main GUI object gui = Main(to_GUI, to_BS)
from gui import Main if __name__ == "__main__": app = Main() app.mainloop()
def on_open(self): with enaml.imports(): from gui import Main mainWindow=Main() mainWindow.AO=AO() self.windows.append(mainWindow)
def __init__(self, argv): QApplication.__init__(self, argv) self.ui = Main() self.ui.show()