Timed execution in eval

alex.pedwysocki at gmail.com alex.pedwysocki at gmail.com
Fri Mar 7 11:12:38 EST 2008


I have various bits of code I want to interpret and run at runtime in
eval ...

I want to be able to detect if they fail with error, I want to be able
to time them, and I want to be able to stop them if they run too
long.  I cannot add code to the eval'd strings that will help me
accomplish this.

Is there a good way to do this?  I have it figured out for perl but
I'd rather use python if possible.

Thanks for any assistance.



More information about the Python-list mailing list