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

Jeremy Sanders jeremy+complangpython at jeremysanders.net
Wed Nov 9 04:32:10 EST 2005


vinjvinj wrote:
 
> 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.

The safest way to do this in unix is to run the model in a separate process,
and use ulimit (or the resource module) to limit the memory usage.

-- 
Jeremy Sanders
http://www.jeremysanders.net/



More information about the Python-list mailing list