python暂停和恢复无限循环

import threadingimport timeclass A(): aa = "" class tt(threading.Thread): def __init__(self): threading.Thread.__init__(self) def run(self): while True: a.aa = raw_input('enter:') if a.aa=='Q': breakdef main(): my_t = tt() ...
python暂停和恢复无限循环
import threadingimport timeclass A(): aa = "" class tt(threading.Thread): def __init__(self): threading.Thread.__init__(self) def run(self): while True: a.aa = raw_input('enter:') if a.aa=='Q': breakdef main(): my_t = tt() my_t.start() while True: if a.aa=="A": continue elif a.aa=="Q": break else: print('hello',a.aa) time.sleep(1)a = A()main()2016-07-15
mengvlog 阅读 1062 次 更新于 2025-10-30 03:54:20 我来答关注问题0
檬味博客在线解答立即免费咨询

报错相关话题

Copyright © 2023 WWW.MENGVLOG.COM - 檬味博客
返回顶部