PyDocs

Nav

Python Runtime Services

exit

sys

function
  • exit([arg])
Exit the interpreter by raising SystemExit(status).

If the status is omitted or None, it defaults to zero (i.e., success).
If the status is an integer, it will be used as the system exit status.
If it is another kind of object, it will be printed and the system
exit status will be one (i.e., failure).
Changed in 3.6
  • 3.6: If an error occurs in the cleanup after the Python interpreter has caught SystemExit (such as an error flushing buffered data in the standard streams), the exit status is changed to 120.
0 Examples
No examples for sys/exit.
See Also
No see-alsos for sys/exit
0 Notes
No notes for exit