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 <rep...@bugs.python.org>
<http://bugs.python.org/issue26189>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to