shell/py.py now tries to pOpen using the python that is currently running, as opposed to just using 'python'.
This commit is contained in:
parent
f97a4adccd
commit
c00ddec9a9
@ -1,4 +1,5 @@
|
||||
from subprocess import Popen, PIPE
|
||||
import os
|
||||
|
||||
def run(script, doc, output_file=None, options={}):
|
||||
""" process an Python script """
|
||||
@ -10,7 +11,8 @@ def run(script, doc, output_file=None, options={}):
|
||||
|
||||
options = sum([['--'+key, value] for key,value in options.items()], [])
|
||||
|
||||
proc = Popen(['python', script] + options,
|
||||
python = os.environ.get('_', 'python')
|
||||
proc = Popen([python, script] + options,
|
||||
stdin=PIPE, stdout=out, stderr=PIPE)
|
||||
|
||||
stdout, stderr = proc.communicate(doc)
|
||||
|
Loading…
Reference in New Issue
Block a user