def check_cmdOk(self):
print(“进入 check_cmdOk”)
with eventlet.Timeout(1,False):#设置超时时间为2秒
# time.sleep(4)
print(‘进入eventlet.Timeout(3,False)’)
while True:
sleep(1)
print(“在 while(1)里面”)
QApplication.processEvents()
# sleep(1)
# temp =self.data_receive()
#
# if temp ==True:
# print(“ok已获取”)
# return
# else:
# print(“输入指令错误”)
# return
print(‘超时并跳过了输出’)
出现了无法跳出来的问题,记录一下,解决了再更新,如果有网友看到能帮忙解决就更好了,技术交流,哈哈哈