[IPython-dev] running shell command from engine
Maximilian Albert
maximilian.albert at gmail.com
Fri Jun 20 06:32:34 EDT 2014
2014-06-19 19:29 GMT+01:00 Fernando Perez <fperez.net at gmail.com>:
> 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...
>
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.
Cheers,
Max
[1] https://pypi.python.org/pypi/sh
[2] http://amoffat.github.io/sh/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140620/9e7ed7cf/attachment.html>
More information about the IPython-dev
mailing list