Using python for writing models: How to run models in restricted python mode?

Paul Rubin http
Tue Nov 8 03:54:26 CET 2005


Steven D'Aprano <steve at REMOVEMEcyber.com.au> writes:
> I suspect your best bet might be to write a mini-language using
> Python, and get your users to use that. You will take a small
> performance hit, but security will be very much improved.
> 
> What do others think?

That is the only approach that makes any sense.  Even with restricted
execution there's no way to stop memory exhaustion with restricted
Python statements.  Consider 

   xxx = 'x'*10000000000



More information about the Python-list mailing list