Python exit codes

后端 未结 4 1032
失恋的感觉
失恋的感觉 2021-02-18 22:11

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

4条回答
  •  滥情空心
    2021-02-18 22:34

    Unfortunately, there is no 100% guarantee that Python's exit codes will be what the documentation claims they will be: os._exit allows the Python programmer to define which exit code is supposed to be used, which means python file_exists_but_claims_that_it_does_not.py could exit with os.EX_DATAERR.

提交回复
热议问题