How can I protect my web server, if I run custom users code on server. If any user can submit his python source on my server and run it.
Maybe some modules or linux tools for close any network and hardware activity for this script.
Thank's all for help!
In general, python is not the best language choice if you want to allow the execution of untrusted code.  The JVM and .NET have much better support for sandboxing, so Jython and IronPython would be better choices.
Safest python code running