On Wed, Sep 16, 2009 at 6:07 AM, C or L Smith <smi...@worksmail.net> wrote:
>>> Serdar wrote:
> ...
>>> So again, is there a way to place a time limit on the execution of a
>>> function, after which you can break out of it and then retry it or
>>> move along with the rest of your program?
>
> At http://tinyurl.com/rbre9n you can find a recipe that tells you how to 
> decorate a function so it will return after a given amount of time. According 
> to the comments, this will leave the process still running, but at least the 
> whole program won't hang. I've used it successfully from time to time.

All that recipe really does is to tell you that the function has taken
too long. It doesn't stop it.

Kent
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to