Re: [pypy-dev] Could PyPy be embeded running in sanbox?

2015-05-15 Thread Yicong Huang
Hi Armin, Thanks for the answer! I quite agree with you that cfii is very powerful and should not include in sandbox. However, could we consider include a small subset of cffi? Considering the typical user usage, I think the below features are sufficient to satisfiy most of cases: 1. Convert commo

Re: [pypy-dev] Could PyPy be embeded running in sanbox?

2015-05-15 Thread Armin Rigo
Hi Yicong, No, PyPy cannot be embedded running sandbox. The way we present embedding is by using the cffi module on the Python code; but this module is not available at all in a sandboxed PyPy (as it allows random invalid things to occur). If you really want to use the sandbox, you need to consi

[pypy-dev] Could PyPy be embeded running in sanbox?

2015-05-15 Thread Yicong Huang
In the document, we see PyPy could be embeded in C++ code as the following: pypy_execute_source_ptr(source, &api); The source is a string of python code. But I think by default the code does not run in sandbox. Are there any methods to run the code in sandbox? ___

Re: [pypy-dev] pypy + cProfile

2015-05-15 Thread Stanislav Bohm
On 05/14/2015 11:18 AM, Armin Rigo wrote: Hi Stanislav, Then it looks likely to be a "randomness" issue: details in your program are JIT-compiled differently when cProfile is enabled. For example, cProfile makes traces longer and this can change a few heuristics. It's likely that by tweaking y