Sandboxing Python

Chris Angelico rosuav at gmail.com
Sun Aug 23 07:41:48 CEST 2015


On Sun, Aug 23, 2015 at 3:17 PM, Christian Gollwitzer <auriocus at gmx.de> wrote:
> Would it be that difficult to get the same for Python? On the C side, the
> interpreter is a structure and does not use global variables (as opposed to
> CPython), therefore it is easy to create more than one interpreter in a
> single program, and also to reflect that to the scripting level.

There have been some explorations in that direction. However, it would
be very difficult to pass objects from one interpreter to the other,
so you'd be restricted to some form of serialization... at which point
you may as well just use a subprocess, which you can isolate using OS
facilities.

ChrisA


More information about the Python-list mailing list