Altered pOpen patch to use sys.executable instead of os.environ['_']
This commit is contained in:
parent
c00ddec9a9
commit
9dbc6b5dbe
@ -1,5 +1,5 @@
|
||||
from subprocess import Popen, PIPE
|
||||
import os
|
||||
import sys
|
||||
|
||||
def run(script, doc, output_file=None, options={}):
|
||||
""" process an Python script """
|
||||
@ -11,8 +11,7 @@ def run(script, doc, output_file=None, options={}):
|
||||
|
||||
options = sum([['--'+key, value] for key,value in options.items()], [])
|
||||
|
||||
python = os.environ.get('_', 'python')
|
||||
proc = Popen([python, script] + options,
|
||||
proc = Popen([sys.executable, script] + options,
|
||||
stdin=PIPE, stdout=out, stderr=PIPE)
|
||||
|
||||
stdout, stderr = proc.communicate(doc)
|
||||
|
Loading…
Reference in New Issue
Block a user