Commit c7b6bede authored by Tim Peters's avatar Tim Peters

Use sys.executable to run Python, as suggested by Neal Norwitz.

parent a64295b4
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
from test_support import TESTFN, vereq from test_support import TESTFN, vereq
import atexit import atexit
import os import os
import sys
input = """\ input = """\
import atexit import atexit
...@@ -22,7 +23,7 @@ f = file(fname, "w") ...@@ -22,7 +23,7 @@ f = file(fname, "w")
f.write(input) f.write(input)
f.close() f.close()
p = os.popen("python " + fname) p = os.popen("%s %s" % (sys.executable, fname))
output = p.read() output = p.read()
p.close() p.close()
vereq(output, """\ vereq(output, """\
...@@ -50,7 +51,7 @@ f = file(fname, "w") ...@@ -50,7 +51,7 @@ f = file(fname, "w")
f.write(input) f.write(input)
f.close() f.close()
p = os.popen("python " + fname) p = os.popen("%s %s" % (sys.executable, fname))
output = p.read() output = p.read()
p.close() p.close()
vereq(output, """\ vereq(output, """\
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment