[Python-ideas] shutil.runret and shutil.runout
g.brandl at gmx.net
Fri Feb 24 19:17:08 CET 2012
Am 24.02.2012 12:12, schrieb anatoly techtonik:
> On Fri, Feb 24, 2012 at 1:59 PM, Nick Coghlan <ncoghlan at gmail.com> wrote:
>> On Fri, Feb 24, 2012 at 8:52 PM, anatoly techtonik <techtonik at gmail.com> wrote:
>>> 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.
>> I believe you'll find the simple convenience methods you are
>> requesting already exist, in the form of subprocess.call(),
>> subprocess.check_call() and subprocess.check_output(). The
>> documentation has also been updated to emphasise these convenience
>> functions over the Popen swiss army knife.
> I don't find the names of these functions more intuitive than Popen().
> I also think they far from being simple, because (in the order of appearance):
> 1. they require try/catch
> 2. docs still refer Popen, which IS complicated
> 3. contain shell FUD
> 4. completely confuse users with stdout=PIPE or stderr=PIPE stuff
> My verdict - these fail to be simple, and require the same low-level
> system knowledge as Popen() for confident use.
And therefore they need to be completely replaced by something incompatible
and in another module? Sorry, Anatoly, this is not how Python development
happens. We usually work incrementally, improving on what we have rather
than throwing all out the door.
I think this is what rubs most people wrong about your posts: you invariably
propose radical changes that invalidate all previous work in the related
area. That's something apart from your style of expression, which was
So here's some constructive advice: your point 1 was shown invalid. The
points 2-4 are "merely" documentation related: how about you think about
how to improve these docs to be less confusing?
More information about the Python-ideas