[Python-ideas] shutil.runret and shutil.runout

Tarek Ziadé ziade.tarek at gmail.com
Fri Feb 24 12:10:08 CET 2012

On Fri, Feb 24, 2012 at 11:52 AM, anatoly techtonik <techtonik at gmail.com>wrote:

> Hello,
> subprocess is low level, cryptic, does too much, with poor usability,
> i.e. "don't make me think" is not about it. I don't know about you,
> but I can hardly write any subprocess call without spending at least
> 5-10 meditating over the documentation. So, I propose two high level
> KISS functions for shell utils (shutil) module:
> runret(command)   - run command through shell, return ret code

mmm you are describing subprocess.call()  here... I don't see how this new
command makes thing better, besides shell=True.

> runout(command)  - run command through shell, return output

what is 'output' ? the stderr ? the stdout ? a merge of both ?

what about subprocess.check_output() ?

> To avoid subprocess story (that makes Python too complicated)

I seems to me that the only complication here is shell=True, which seems ok
to me to have it at False for security reasons.


Tarek Ziadé | http://ziade.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20120224/6d4f0fce/attachment.html>

More information about the Python-ideas mailing list