[issue23342] run() - unified high-level interface for subprocess

Gregory P. Smith report at bugs.python.org
Thu Jan 29 00:03:40 CET 2015


Gregory P. Smith added the comment:

A 1) Opting not to capture by default is good.  Let people explicitly request that.

A 2) "check" seems like a reasonable parameter name for the "should i raise if rc != 0" bool.  I don't have any other good bikeshed name suggestions.

A 3) Calling it args the same way Popen does is consistent.  That the attribute on the exceptions is 'cmd' is a bit of an old wart but seems reasonable.  Neither the name 'args' or 'cmd' is actually good for any use in subprocess as it is already an unfortunately multi-typed parameter.  It can either be a string or it can be a sequence of strings.  The documentation is not clear about what type(s) 'cmd' may be.

A Another) Now that they gain a stderr attribute, having a corresponding stdout one would make sense.  Implement it as a property and document it with a versionadded 3.5 as usual.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue23342>
_______________________________________


More information about the Python-bugs-list mailing list