[pypy-issue] [issue1742] pypy_interact.py pushes the wrong sys.path
Peter Xu
tracker at bugs.pypy.org
Fri Apr 25 06:55:15 CEST 2014
New submission from Peter Xu <px.peter.xu at gmail.com>:
When running python pypy_interact.py path/to/pypy-c-sandbox, we get:
$ python pypy_interact.py ../goal/pypy-c-sandbox
Traceback (most recent call last):
File "pypy_interact.py", line 25, in <module>
from rpython.translator.sandbox.sandlib import SimpleIOSandboxedProc
ImportError: No module named rpython.translator.sandbox.sandlib
This is because of the line:
sys.path.insert(0, os.path.realpath(os.path.join(os.path.dirname(__file__),
'..', '..', '..')))
Which doesn't work for the new directory structure (it used to be
pypy/translator/sandbox rather than pypy/sandbox).
Substituting in
sys.path.insert(0, os.path.realpath(os.path.join(os.path.dirname(__file__),
'..', '..', '..')))
fixes the problem.
----------
messages: 6782
nosy: peter, pypy-issue
priority: bug
status: unread
title: pypy_interact.py pushes the wrong sys.path
________________________________________
PyPy bug tracker <tracker at bugs.pypy.org>
<https://bugs.pypy.org/issue1742>
________________________________________
More information about the pypy-issue
mailing list