def __init__(self, data_dic): try: self.roach = data_dic["instance"](data_dic) except MissingInformation as exp: warning_signal = exp.message content = RoachWarningBox(warning_signal + ",\nUse dummy Roach?") a_popup = Popup( title="Choose Bof", auto_dismiss=True, content=content, size_hint=(None, None), size=(400, 400) ) content.set_popup(a_popup) content.set_popup(a_popup) a_popup.open() while content.continues: pass if content.choise: self.roach = DummyRoach_FPGA(data_dic) return raise exp
class DataThread(Process): def __init__(self, data_dic): try: self.roach = data_dic["instance"](data_dic) except MissingInformation as exp: warning_signal = exp.message content = RoachWarningBox(warning_signal + ",\nUse dummy Roach?") a_popup = Popup( title="Choose Bof", auto_dismiss=True, content=content, size_hint=(None, None), size=(400, 400) ) content.set_popup(a_popup) content.set_popup(a_popup) a_popup.open() while content.continues: pass if content.choise: self.roach = DummyRoach_FPGA(data_dic) return raise exp def start_connections(self): try: self.roach.connect_to() if not self.roach.is_conected(): raise Exception("Connection Fail") self.roach.configure() except Exception as e: raise RoachException(e.message) def accuaire_data(self): return self.roach.accuaire_data() def close_process(self): self.roach.stop()