[Python-ideas] shutil.runret and shutil.runout
anacrolix at gmail.com
Sun Feb 26 12:59:17 CET 2012
I strongly suspect such 3rd party library exists.
On Feb 26, 2012 7:49 PM, "Serhiy Storchaka" <storchaka at gmail.com> wrote:
> 24.02.12 14:41, Nick Coghlan написав(ла):
> > On Fri, Feb 24, 2012 at 10:13 PM, Mike Meyer<mwm at mired.org> wrote:
> >> Oddly enough, I read the Julia docs on external commands between my
> >> first answer and your reply, and their solution is both as simple as
> >> what you want, and safe.
> Yes, I want this in Python:
> readall(cmd('cut -d: -f3 $file', file='/etc/passwd') | cmd('sort -n') |
> cmd('tail -n5'))
> cmd('cut', '-d:', '-f3', '/etc/passwd').pipe('sort', '-n').pipe('tail',
> or something similar.
> > That *is* rather nice, although they never get around to actually
> > explaining *how* to capture the output from the child processes
> > (http://julialang.org/manual/running-external-programs/, for anyone
> > else that's interested).
> See readall and each_line.
> Python-ideas mailing list
> Python-ideas at python.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-ideas