def main(): stdscr = curses.initscr() curses.noecho() HOST="localhost" PORT=5001 control = controller.Controller((HOST, PORT), controller.RequestHandler) try: while True: message = control.get_message() if message is not None: stdscr.clear() stdscr.border(0) stdscr.addstr(2,2, HOST+':'+str(PORT) ) stdscr.addstr(4, 4, str(message) ) stdscr.refresh() time.sleep(0.25) except KeyboardInterrupt: controller.shutdown() exit(0) curses.endwin()
def test(): controller.initialize() takeScreenshot() controller.shutdown()
def shutdownAll(): emulator.shutdown() screenshot.shutdown() controller.shutdown() imgUtils.shutdown()