def start_app(window: curses.window, messages): window.keypad(False) curses.init_pair(1, curses.COLOR_WHITE, 18) curses.init_pair(2, curses.COLOR_WHITE, 21) termulator = Termulator(window, messages) termulator.run()
def main(win: curses.window) -> None: win.keypad(True) net = Network(receiveCallback=receptionCallback, eventCallback=eventCallback) net.startReceptionThread() windowThread = threading.Thread(target=threadRefreshScreen, args=(win, )) windowThread.daemon = True windowThread.start() keyThread = threading.Thread(target=threadGetKeys, args=( win, net, )) keyThread.daemon = True keyThread.start() periodicThread = threading.Thread(target=threadPeriodic, args=(net, )) periodicThread.daemon = True periodicThread.start() keyThread.join() while True: time.sleep(2.0)