Cross-platform time out decorator
kyosohma at gmail.com
kyosohma at gmail.com
Thu Sep 27 09:27:54 EDT 2007
On Sep 26, 5:21 am, Joel <joel.schae... at gmail.com> wrote:
> I've been using this nice timing out decorator :http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/307871. The
> problem is that since it relies on sigalarm, it doesn't work under
> windows. Would anyone know how to do a cross-platform version?
>
> Thanks a lot!
>
> joel
You might be able to use the timeit module.
http://docs.python.org/lib/module-timeit.html
Some people like to use hotshot:
http://www.onlamp.com/pub/a/python/2005/12/15/profiling.html
I doubt this is what you're looking for, but maybe it'll give you a
push in the right direction.
Mike
More information about the Python-list
mailing list