From: Tim Peters Date: Wed, 17 Jul 2002 00:42:52 +0000 (+0000) Subject: Use sys.executable to run Python, as suggested by Neal Norwitz. X-Git-Tag: v2.2.2b1~262 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ef84b97c7ac9c7adc9ab174bd4b250cc916b5449;p=thirdparty%2FPython%2Fcpython.git Use sys.executable to run Python, as suggested by Neal Norwitz. --- diff --git a/Lib/test/test_atexit.py b/Lib/test/test_atexit.py index ad5bced50922..64c4c3c68d70 100644 --- a/Lib/test/test_atexit.py +++ b/Lib/test/test_atexit.py @@ -2,6 +2,7 @@ from test_support import TESTFN, vereq import atexit import os +import sys input = """\ import atexit @@ -22,7 +23,7 @@ f = file(fname, "w") f.write(input) f.close() -p = os.popen("python " + fname) +p = os.popen("%s %s" % (sys.executable, fname)) output = p.read() p.close() vereq(output, """\ @@ -50,7 +51,7 @@ f = file(fname, "w") f.write(input) f.close() -p = os.popen("python " + fname) +p = os.popen("%s %s" % (sys.executable, fname)) output = p.read() p.close() vereq(output, """\