Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在制作一个程序,它既可以监听来自循环 raw_input 的命令,又可以反复检查文件是否有更新。有没有办法做到这一点?基本上,有一个time.sleep(1)用于检查文件的循环和一个带有raw_input. 多处理似乎不是我需要的。
time.sleep(1)
raw_input
所以看起来答案是“线程”。似乎很有希望。