python RuntimeError: main thread is not in main loop

python RuntimeError: main thread is not in main loop_第1张图片

 

RuntimeError: main thread is not in main loop这个错误记录一下

原始代码

  def show(self):
            T = threading.Thread(target=self.__show, args=())
            T.start()

修正后代码

    def show(self):
            T = threading.Thread(target=self.__show, args=())
            T.setDaemon(True)
            T.start()

记录一下

你可能感兴趣的:(源代码,Python,python)