====== sys ====== ===== sys.exit() ===== Always use ''sys.exit()'' to exit in production code. Built-in's like ''quit'' or ''exit'' can be omitted in some envs. ===== os._exit() ===== **os._exit(n)** Exit the process with status n, without calling cleanup handlers, flushing stdio buffers, etc. Note: The standard way to exit is sys.exit(n). _exit() should normally only be used in the child process after a fork(). ==== exit codes ==== [[https://docs.python.org/3/library/os.html#os.EX_OK|os.EX_OK]]