def start_loop(self): self.loop = threading.Thread(target=GObject.MainLoop().run) self.loop.daemon = True self.loop.start()