class ChopGui: def __init__(self, ui_stop_fn=None, lib_stop_fn=None): from ChopShopCurses import ChopShopCurses self.cui = ChopShopCurses(ui_stop_fn, lib_stop_fn) self.cui.go() def handle_message(self, message): if message['data']['suppress']: newline = "" else: newline = "\n" self.cui.add_data(message['id'], message['data']['data'] + newline, message['data']['color']) def handle_ctrl(self, message): if message['data']['msg'] == 'addmod': self.cui.add_panel(message['data']['id'], message['data']['name']) if message['data']['msg'] == 'finished' and message['data'][ 'status'] == 'error': self.stop() raise Exception(message['data']['errors']) def stop(self): CSD.debug_out("ChopGui stop called\n") self.cui.stop() self.cui.join()
class ChopGui: def __init__(self, ui_stop_fn = None, lib_stop_fn = None): from ChopShopCurses import ChopShopCurses self.cui = ChopShopCurses(ui_stop_fn, lib_stop_fn) self.cui.go() def handle_message(self, message): if message['data']['suppress']: newline = "" else: newline = "\n" self.cui.add_data(message['id'], message['data']['data'] + newline, message['data']['color']) def handle_ctrl(self, message): if message['data']['msg'] == 'addmod': self.cui.add_panel(message['data']['id'],message['data']['name']) if message['data']['msg'] == 'finished' and message['data']['status'] == 'error': self.stop() raise ChopLibException(message['data']['errors']) def stop(self): CSD.debug_out("ChopGui stop called\n") self.cui.stop() self.cui.join()
class ChopGui: def __init__(self, ui_stop_fn=None, lib_stop_fn=None): from ChopShopCurses import ChopShopCurses self.cui = ChopShopCurses(ui_stop_fn, lib_stop_fn) self.cui.go() def handle_message(self, message): if message["data"]["suppress"]: newline = "" else: newline = "\n" self.cui.add_data(message["id"], message["data"]["data"] + newline, message["data"]["color"]) def handle_ctrl(self, message): if message["data"]["msg"] == "addmod": self.cui.add_panel(message["data"]["id"], message["data"]["name"]) if message["data"]["msg"] == "finished" and message["data"]["status"] == "error": self.stop() raise ChopLibException(message["data"]["errors"]) def stop(self): CSD.debug_out("ChopGui stop called\n") self.cui.stop() self.cui.join()
def __init__(self, ui_stop_fn=None, lib_stop_fn=None): from ChopShopCurses import ChopShopCurses self.cui = ChopShopCurses(ui_stop_fn, lib_stop_fn) self.cui.go()
def __init__(self, ui_stop_fn = None, lib_stop_fn = None): from ChopShopCurses import ChopShopCurses self.cui = ChopShopCurses(ui_stop_fn, lib_stop_fn) self.cui.go()