"Michael Sparks" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
> An alternative to this is this:
>
> def updater(interval, message):
>   t = time.time():
>   while 1:
>      if time.time() - t > interval:
>         print message

           yield None # add this ????

>
> def long_running_thing(foo):
>   myUpdater = updater(5, "Still running")
>   while running:
>       << do something long running>>
>       myUpdater.next()



-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to