Question

I'll preface this by saying I am quite new to PyPy, though fairly experienced with Python.

I'm looking to run a web app where I run untrusted Python code. The PyPy sandboxing features look ideal for what I'm doing.

The PyPy docs on sandboxing indicate that you can call a PyPy sandbox from either Python or PyPy. This seems to imply that there's some separate program or executable that is the sandbox.

I'm wondering, is it possible to call a PyPy sandbox from a non-Python language? I'm looking at Haskell in particular, but it's also very possible that I could use C or C++ as an intermediate.

Was it helpful?

Solution

Yes, that's possible. The PyPy sandbox is a separate process communicating only via stdin/stdout. If you want to rewrite the "external" part, you can; it's not using anything that should be too heavily Python-related.

OTHER TIPS

Note that the sandboxing feature of PyPy is not being maintained any more, see http://www.pypy.org/features.html#sandboxing

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top