Marco Mariani <[email protected]> wrote: > John O'Hagan wrote: > > > Is there a concise Pythonic way to write a method with a timeout? > > No need for threading. Just define a signal handler and call signal.alarm(). > > See the example at the end of the page: > > http://docs.python.org/library/signal.html
Won't work on windows and there is only one sigalarm timer, so you can't nest them :-( -- Nick Craig-Wood <[email protected]> -- http://www.craig-wood.com/nick -- http://mail.python.org/mailman/listinfo/python-list
