17.1.1.1 Convenience Functions
This module also defines two shortcut functions:
-
Run command with arguments. Wait for command to complete, then
return the returncode attribute.
The arguments are the same as for the Popen constructor. Example:
retcode = call(["ls", "-l"])
-
Run command with arguments. Wait for command to complete. If the exit
code was zero then return, otherwise raise CalledProcessError.
The CalledProcessError object will have the return code in the
returncode attribute.
The arguments are the same as for the Popen constructor. Example:
check_call(["ls", "-l"])
See About this document... for information on suggesting changes.