[Python-ideas] Add output() helper function to subprocess module

Greg Ewing greg.ewing at canterbury.ac.nz
Thu Apr 4 03:47:30 EDT 2019


The check_output() function of the subprocess module raises an
exception if the process returns a non-zero exit status. This is
inconvenient for commands such as grep that use the return
status to indicate something other than success or failure.

The check_call() function has a companion call(), but here is
currently no non-checking companion for check_call(). How
about adding one with a signature such as

output(args) --> (status, output)

-- 
Greg


More information about the Python-ideas mailing list