<div dir="ltr">2014-06-19 19:29 GMT+01:00 Fernando Perez <span dir="ltr"><<a href="mailto:fperez.net@gmail.com" target="_blank">fperez.net@gmail.com</a>></span>:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">Sure! Popen won't give you an actual result that's very useful, you'll need to decide whether to capture stdout/err, to use pipes, etc. But subprocess/popen are just python functions like any other, so you can use them all the same...</div>
</blockquote><div><br></div><div>On a related note, I have found the 'sh' module [1,2] *much* more convenient to use and its error messages (which are raised as exceptions when the subprocess exits with an error) much easier to debug than using subprocess directly.<br>
<br></div><div>Cheers,<br>Max<br><br>[1] <a href="https://pypi.python.org/pypi/sh">https://pypi.python.org/pypi/sh</a><br>[2] <a href="http://amoffat.github.io/sh/">http://amoffat.github.io/sh/</a><br></div></div></div></div>