[pypy-dev] Question about PyPy Sandboxing
Armin Rigo
arigo at tunes.org
Tue Jun 24 09:17:28 CEST 2014
Hi Kit,
On 24 June 2014 02:42, Kit Ham <kitizz.devside at gmail.com> wrote:
> Can multiple PyPy sandboxes be executed and interacted with from C/C++?
Yes, you can in theory do whatever you want, but it is not really
finished and documented.
You first need to decide if it's ok that each sandbox runs in a
separate process or if you would rather have an in-process solution
(more work). In the first case, you'd extend the "controller"
(regular Python code controlling the sandboxed subprocess) so that it
can handle several subprocesses at once. Then, for example, you'd run
the controller in CPython, and link to CPython from your C/C++ code
using the standard CPython ways. Or you can even rewrite the
controller in C/C++: it's just some code reading and writing to the
subprocesses' stdin/stdout. (Each subprocess is one sandboxed PyPy
instance.)
A bientôt,
Armin.
More information about the pypy-dev
mailing list