Author: Armin Rigo <ar...@tunes.org> Branch: Changeset: r62274:a37006b7fffa Date: 2013-03-10 12:43 +0100 http://bitbucket.org/pypy/pypy/changeset/a37006b7fffa/
Log: Improve a bit issue #1412: dotviewer python path diff --git a/dotviewer/graphclient.py b/dotviewer/graphclient.py --- a/dotviewer/graphclient.py +++ b/dotviewer/graphclient.py @@ -128,7 +128,14 @@ def spawn_local_handler(): if hasattr(sys, 'pypy_objspaceclass'): - python = '/usr/bin/python' + # if 'python' is actually PyPy, e.g. in a virtualenv, then + # try hard to find a real CPython + for python in ['/usr/local/bin/python', '/usr/bin/python']: + if os.path.exists(python): + break + else: + # did not work, fall back to 'python' + python = 'python' else: python = sys.executable args = [python, '-u', GRAPHSERVER, '--stdio'] _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit