Where can I find information about meaning of exit codes of \"python\" process on Unix? For instance, if I do \"python thisfiledoesntexist.py\", I get exit code 2
Summar
As stated, mostly the error codes come from the executed script and sys.exit()
.
The example with a non-existing file as an argument to the interpreter fall in a different category. Though it's stated nowhere I would guess, that these exit codes are the "standard" Linux error codes. There is a module called errno that provides these error numbers (the exit codes come from linux/include/errno.h
.
I.e.: errno.ENOENT
(stands for for "No such file or directory") has the number 2 which coincides with your example.