Did anyone write a contextmanager implementing a timeout for
python2.5?

I'd love to be able to write something like

    with timeout(5.0) as exceeded:
        some_long_running_stuff()
    if exceeded:
        print "Oops - took too long!"

And have it work reliably and in a cross platform way!

>From my experiments with timeouts I suspect it won't be possible to
implement it perfectly in python 2.5 - maybe we could add some extra
core infrastructure to Python 3k to make it possible?

-- 
Nick Craig-Wood <[EMAIL PROTECTED]> -- http://www.craig-wood.com/nick
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to