[issue1742] pypy_interact.py pushes the wrong sys.path

New submission from Peter Xu <px.peter.xu@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@bugs.pypy.org> <https://bugs.pypy.org/issue1742> ________________________________________
participants (1)
-
Peter Xu