7 ms·
note that `exit()` on a script will also not work, as the exit function is only loaded on REPL. To make it work on a script, you will need to import the sys pac
by mariocesar 2y ago
note that `exit()` on a script will also not work, as the exit function is only loaded on REPL. To make it work on a script, you will need to import the sys package and later call sys.exit()
- OutOfHere 2y ago`exit()` absolutely works in a script assuming that the `site` module was not bypassed at startup via `python -S`. I understand that `sys.exit()` and others are preferred.