Skip to main content
 首页 » 编程设计

python之返回码与退出状态

2024年10月01日7over140

我阅读了 Python 子进程模块的文档:https://docs.python.org/2/library/subprocess.html#subprocess.check_call

我很困惑。

The CalledProcessError object will have the return code in the returncode attribute.

下面几行:

subprocess.CalledProcessError: Command 'exit 1' returned non-zero exit status 1

这东西叫什么名字?

返回码或退出状态?

请您参考如下方法: