[issue26189] Interpreter returns control to cmd.exe early
Eryk Sun
report at bugs.python.org
Mon Jan 25 13:08:28 EST 2016
Eryk Sun added the comment:
That the wait failed to get the 42 exit code means that the "python" command (which may not actually be python.exe) is spawning a child process to run the command and not waiting for it to exit. Please try the following using the absolute path to python.exe:
C:\>start "title" /b /w "PATH\TO\python.exe" -c "raise SystemExit(42)"
C:\>echo %errorlevel%
42
In this case "title" is required because cmd parses the first quoted string prior to the executable as the title. Without "title" it would parse the path to python.exe as the title and try to execute "-c".
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue26189>
_______________________________________
More information about the Python-bugs-list
mailing list