Index: Modules/getpath.c =================================================================== --- Modules/getpath.c (révision 78834) +++ Modules/getpath.c (copie de travail) @@ -441,7 +441,7 @@ } else progpath[0] = '\0'; - if (progpath[0] != SEP) + if (progpath[0] != SEP && progpath[0] != '\0') absolutize(progpath); strncpy(argv0_path, progpath, MAXPATHLEN); argv0_path[MAXPATHLEN] = '\0'; Index: Lib/test/test_sys.py =================================================================== --- Lib/test/test_sys.py (révision 78834) +++ Lib/test/test_sys.py (copie de travail) @@ -437,6 +437,14 @@ self.assertEqual(sys.call_tracing(str, (2,)), "2") self.assertRaises(TypeError, sys.call_tracing, str, 2) + def test_executable(self): + import subprocess + p = subprocess.Popen( + ["nonexistent", "-c", 'import sys; print "executable=%r" % sys.executable'], + executable=sys.executable, stdout=subprocess.PIPE) + executable = p.communicate()[0].strip() + p.wait() + self.assertEqual(executable, "executable=''") class SizeofTest(unittest.TestCase):