4 ms·
You're certainly right that the module should provide a main loop of some sort for convenience. I wasn't totally sure how to implement this to make everyone ha
by dbader 13y ago
You're certainly right that the module should provide a main loop of some sort for convenience.
I wasn't totally sure how to implement this to make everyone happy -- some people may want to use time.sleep(), others want threading.Event().wait(). Maybe I'll simply go with something like this:
def run_forever(sleep_func=time.sleep):
...