Ivan Illarionov wrote:

> You don't need to envoke another interpreter.
> Python can interpret arbitrary python code with exec statement.
> Wrap user's string inside function definition, and exec it.
> 
> You might want to disable words like `import`, `exec` and `eval` in
> user's code because it's a big security risk.

The above statement is exactly why one would want to eval the code 
inside a separate interpreter. Not just for security, but to prevent 
user code from stomping all over the application code by creating or 
destroying global resources.

Is it possible to create a nested interpreter like you can do in some 
other languages?
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to