[Python-ideas] shutil.run (Was: shutil.runret and shutil.runout)

Nick Coghlan ncoghlan at gmail.com
Wed May 23 09:09:12 CEST 2012


On Wed, May 23, 2012 at 4:49 PM, Devin Jeanpierre
<jeanpierreda at gmail.com> wrote:
> On Tue, May 22, 2012 at 5:41 PM, Nick Coghlan <ncoghlan at gmail.com> wrote:
>> Having dealt with long running child processes lately, I can also say that
>> producing output line-by-line would be on my personal list of requirements.
>
> You can do that with subprocess, right? Just have to be sure to close
> stdin/stderr and read p.stdout with readline() repeatedly...

Yep, subprocess is a swiss army knife - you can do pretty much
anything with it. That's the complaint, though - *because* it's so
configurable, even the existing convenience APIs aren't always that
convenient for simple operations.

Thus the current spate of efforts to provide a "friendlier" API for
performing shell operations from Python. The dust may settle well
enough in the 3.4 time frame for us to declare a "winner" and add
something to the standard library, but that's far from certain.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia



More information about the Python-ideas mailing list