I have two different installations of Python (one is inside a chrooted jail, one outside, and they have different versions). From a Python script running with one of them, I need to call "the other Python" and get some internal value (sys.path).
I can use something like
subprocess.call("<the other python> -c 'import sys; print sys.path'", shell=True)
redirect it to a file, read it from there, etc. but that seems convoluted, to go through IO like that.
Is there an easy direct way?
(Basically, I need to append sys.path from one Python to another Python's sys.path).