Make the subprocesses work and return the right sys paths for the different versions

This commit is contained in:
Dave Halter
2017-11-15 08:58:13 +01:00
parent 96149d2e6a
commit 4136dcaf08
6 changed files with 53 additions and 41 deletions
@@ -1,3 +1,15 @@
import sys
import os
# Get the path to jedi.
_d = os.path.dirname
_jedi_path = _d(_d(_d(_d(_d(__file__)))))
_parso_path = sys.argv[1]
# This is kind of stupid. We actually don't want to modify the sys path but
# simply import something from a specific location.
sys.path[0:0] = [_jedi_path, _parso_path]
from jedi.evaluate.compiled import subprocess
sys.path[0:2] = []
subprocess.Listener().listen()