Corrected example for replacing shell pipeline. Fixes bug 1073790.
This commit is contained in:
parent
4871535cfe
commit
6fdf3cbb13
|
@ -239,7 +239,7 @@ output = Popen(["mycmd", "myarg"], stdout=PIPE).communicate()[0]
|
|||
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]
|
||||
\end{verbatim}
|
||||
|
||||
|
|
|
@ -229,7 +229,7 @@ Replacing shell pipe line
|
|||
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]
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue