I'm referring to "Sandbox Ironpython".
I have somewhat different requirements from the original poster:
Specifically, we need different functionalities to be limited - file system access is okay, most of the standard python modules are also okay, but only a few explicit .NET dlls are to be allowed (we want to restrict the python scripts to the "official" API we provide). AFAICs, this requires to hook into the implementation of the python import statement.
Any way to accomplish this?
Thanks in advance!
Yes, AppDomains are the only way. If you limit access via the .NET sandboxing then anything you could do w/ the standard library would be appropriately limited as well. So why bother restricting any of the Python scripts? They can't do anything you haven't otherwise permitted.