0
我正在寻找一个简单的python进程,开始在后台运行,循环计数分钟。我想发送一个信号(从脚本外部)到进程来打破循环。可能有许多这些脚本同时打开和运行。来自听众的循环中断
while True:
timer=timer+1
time.sleep(60)
# listener that receives a signal from outside the program
# to stop the loop return timer and then end the program
if (timeup==True):
break
你想Python,你说,但你的标题和标签都是指PHP。你到底在问什么? – 2014-02-20 22:39:03
我宁愿PHP,但经过一些基础研究后,似乎它会更容易在python或c中完成 –