7
如何永远运行Python程序?
我需要在无限循环中永远运行我的Python程序。 目前,我正在这样运行- #!/usr/bin/python import time # some python code that I want # to keep on running # Is this the right way to run the python program forever? # And do I even need this time.sleep call? while True: time.sleep(5) 有什么更好的方法吗?还是我甚至需要time.sleep打电话?有什么想法吗?