Corrected example "replacing shell pipe line".

This commit is contained in:
Peter Astrand 2004-11-27 07:44:10 +00:00
parent 293546a942
commit 61de19f122
1 changed files with 1 additions and 1 deletions

View File

@ -354,7 +354,7 @@ Replacing older functions with the subprocess module
output=`dmesg | grep hda`
==>
p1 = Popen(["dmesg"], stdout=PIPE)
p2 = Popen(["grep", "hda"], stdin=p1.stdout)
p2 = Popen(["grep", "hda"], stdin=p1.stdout, stdout=PIPE)
output = p2.communicate()[0]