you can do arbitrary stuff in the python code, including "import sys;
sys.path.insert(0, 'wherever')"

On Thu, Jun 11, 2015 at 5:30 AM, Yicong Huang <hengha....@gmail.com> wrote:
> Here is a typcial scenario:
> We read a python file from a path and got (char*) buffer of the file
> content.
> And then we passed the char* buffer to pypy_execute_source_ptr() to execute.
> However, pypy_execute_source_ptr() looks like to assume the working dir as
> pypy_home.
> And if the python file import a local file in the path, it failed.
>
> Alternative method, could we have a pypy_execute_source_ptr(path pyFile,
> void *ptr)? The first argument indicates the path of python file.
>
>
>
>
> _______________________________________________
> pypy-dev mailing list
> pypy-dev@python.org
> https://mail.python.org/mailman/listinfo/pypy-dev
>
_______________________________________________
pypy-dev mailing list
pypy-dev@python.org
https://mail.python.org/mailman/listinfo/pypy-dev

Reply via email to