Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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):
    ...


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: