<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 28 January 2015 at 10:02, Ethan Furman <span dir="ltr"><<a href="mailto:ethan@stoneleaf.us" target="_blank">ethan@stoneleaf.us</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>> It seems like there's some level of interest in this; shall I work on a patch?<br>
<br>
</span>That would be great!</blockquote></div><br></div><div class="gmail_extra">First pass at a patch attached. I also ended up adding stderr attributes to CalledProcessError and TimeoutExceeded, so information is not thrown away.<br><br></div><div class="gmail_extra">Things I wasn't sure about:<br><br></div><div class="gmail_extra">1. Should stdout/stderr be captured by default? I opted not to, for consistency with Popen and with shells.<br></div><div class="gmail_extra">2. I gave run() a check_returncode parameter, but it feels quite a long name for a parameter. Is 'check' clear enough to use as the parameter name?<br></div><div class="gmail_extra">3. Popen has an 'args' attribute, while CalledProcessError and TimeoutExpired have 'cmd'. CompletedProcess sits between those cases, so which name should it use? For now, it's args.<br><br></div><div class="gmail_extra">Thomas<br></div></div>