def __init__(self): threading.Thread.__init__(self) self.inkey = _Getch() self.setName("KeyPress") self.dispatcher = SimpleEventDispatcher() self.dispatcher.create_event("?") self.dispatcher.create_event("p") self.dispatcher.create_event("s") self.dispatcher.create_event("q") self.do_job = True