def run(self): try: if not self.init: self.setup() self.message_pump() finally: HotKey.unregister_all() WindowsTimer.unregister_all()