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

vinjvinj vinjvinj at gmail.com
Mon Nov 7 15:54:40 EST 2005


I have an application which allows multiple users to write models.
These models get distributed on a grid of compute engines. users submit
their models through a web interface. I want to

1. restrict the user from doing any file io, exec, import, eval, etc. I
was thinking of writing a plugin for pylint to do all the checks? Is
this is a good way given that there is no restricted python. What are
the things I should serach for in python code

2. restrict the amount of memory a module uses as well. For instance
how can I restrict a user from doing a = range(10000000000) or similar
tasks so that my whole compute farm does not come down.

Thanks for your help




More information about the Python-list mailing list