def setUp(self): core = Core(None,use_gui=False) core.gui_process = dummyProcess() core.gui_alive = True self.core_thread = Thread(target=core.run) self.core_thread.start() self.gui_data = DGui() # self.gui_api = Gui_api(self.gui_data, core.core_event_queue, core.gui_id) self.gui_thread = Thread(target=startGUI_TESTMOCK, args=[core.core_event_queue, core.gui_event_queue, core.gui_id, self.gui_data]) self.gui_thread.start() # get data and queues self.core_queue = core.core_event_queue self.gui_queue = core.gui_event_queue self.core_data = core.core_data self.gui_api = Gui_api(self.gui_data, self.core_queue, core.gui_id) time.sleep(1)
def setUp(self): core = Core(None, use_gui=False) core.gui_process = dummyProcess() core.gui_alive = True self.core_thread = Thread(target=core.run) self.core_thread.start() self.gui_data = DGui() # self.gui_api = Gui_api(self.gui_data, core.core_event_queue, core.gui_id) self.gui_thread = Thread(target=startGUI_TESTMOCK, args=[ core.core_event_queue, core.gui_event_queue, core.gui_id, self.gui_data ]) self.gui_thread.start() # get data and queues self.core_queue = core.core_event_queue self.gui_queue = core.gui_event_queue self.core_data = core.core_data self.gui_api = Gui_api(self.gui_data, self.core_queue, core.gui_id) time.sleep(1)
def start_PaPI(args=None): print('Plattform of the system running PaPI: ' + platform.system()) if args is not None: if args.version: print("Current PaPI version: " + pc.CORE_PAPI_VERSION) return # start on PaPI on system running Linux if platform.system() == 'Linux': path = os.path.dirname(pc.PAPI_USER_CFG) if not os.path.exists(path): os.mkdir(path) core = Core(run_gui_in_own_process, is_parent=True, use_gui=True, args=args) core.run() return # start on PaPI on system running Windows if platform.system() == 'Windows': print('Windows port is NOT ready') raise Exception('Windows is not supported yet') return # start on PaPI on system running Mac OS X if platform.system() == 'Darwin': path = os.path.dirname(pc.PAPI_USER_CFG) if not os.path.exists(path): os.mkdir(path) core = Core(run_gui_in_own_process, is_parent=True, use_gui=True, args=args) core.run() return raise Exception('Seems like the os you are using is not supported by PaPI')
def start_PaPI(args=None): print('Plattform of the system running PaPI: ' + platform.system()) if args: if args.version: print("Current PaPI version: " + pc.CORE_PAPI_VERSION) return # start on PaPI on system running Linux if platform.system() == 'Linux': path = os.path.dirname(pc.PAPI_USER_CFG) if not os.path.exists(path): os.mkdir(path) core = Core(run_gui_in_own_process, is_parent=True, use_gui=True, args=args) core.run() return # start on PaPI on system running Windows if platform.system() == 'Windows': print('Windows port is NOT ready') raise Exception('Windows is not supported yet') return # start on PaPI on system running Mac OS X if platform.system() == 'Darwin': path = os.path.dirname(pc.PAPI_USER_CFG) if not os.path.exists(path): os.mkdir(path) core = Core(run_gui_in_own_process, is_parent=True, use_gui=True, args=args) core.run() return # app = QApplication(sys.argv) # gui = GUI(is_parent=True) # gui.run() # gui.show() # app.exec_() # return raise Exception('Seems like the os you are using is not supported by PaPI')
def start_PaPI(args=None): print("Plattform of the system running PaPI: " + platform.system()) if args: if args.version: print("Current PaPI version: " + pc.CORE_PAPI_VERSION) return # start on PaPI on system running Linux if platform.system() == "Linux": path = os.path.dirname(pc.PAPI_USER_CFG) if not os.path.exists(path): os.mkdir(path) core = Core(run_gui_in_own_process, is_parent=True, use_gui=True, args=args) core.run() return # start on PaPI on system running Windows if platform.system() == "Windows": print("Windows port is NOT ready") raise Exception("Windows is not supported yet") return # start on PaPI on system running Mac OS X if platform.system() == "Darwin": path = os.path.dirname(pc.PAPI_USER_CFG) if not os.path.exists(path): os.mkdir(path) core = Core(run_gui_in_own_process, is_parent=True, use_gui=True, args=args) core.run() return # app = QApplication(sys.argv) # gui = GUI(is_parent=True) # gui.run() # gui.show() # app.exec_() # return raise Exception("Seems like the os you are using is not supported by PaPI")