[Python-3000] Will we have a true restricted exec environment for python-3000?

Alexander Schremmer 2005a at usenet.alexanderweb.de
Sun Apr 9 21:28:00 CEST 2006


On Sat, 8 Apr 2006 18:18:13 -0700, Neal Norwitz wrote:

> #3 is easy to do a simple, naive implementation.  I don't know what
> your needs are. If you just want to say "exit this script if it ran
> more than N seconds" you can just modify the eval loop (*). 

Unfortunately, it is not as easy as that. There are many code parts in
Python that are implemented as functions written in C that might take very
long to compute. I just remember how I could stall a well known wiki engine
written in Python (;-) by entering a too complex regular expression into
the search field (it needed quite a lot seconds per page).

Kind regards,
Alexander



More information about the Python-3000 mailing list