On 3/13/2023 10:34 PM, scruel tao wrote:
Interesting, `raise SystemExit` seems to have the same behavior as `sys.exit`:
```shell
python -c "raise SystemExit(100)"
echo $?
<<< 100
python -c " import sys; sys.exit(100)"
echo $?
<<< 100
OTOH, you don't want to get too tricky:
(on Windows, obviously)
C:\Users\tom>py -c "import sys; sys.exit(type(100) == type('a'))"
C:\Users\tom>echo %ERRORLEVEL%
0
Presumably we wouldn't want to get an exit value of 0 for this case!
--
https://mail.python.org/mailman/listinfo/python-list