我有一个小的中继器在它下面一直结束,如何修复更稳定的崩溃,而不是停止运行....我会在 gui 中添加一个心跳以查看它仍在运行。在 Wxpthon 中,我的菜单栏变为空白或白色。
def TimerSetup():
import threading, time
invl = 300
def dothis():
try:
FetchUpdates()
except Exception as e:
pass
class Repeat(threading.Thread):
def run(self):
dothis()
if __name__ == '__main__':
for x in range(7000):
thread = Repeat(name = "Thread-%d" % (x + 1))
thread.start()
time.sleep(invl)