mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Corrected example for replacing shell pipeline. Fixes bug 1073790.
This commit is contained in:
parent
4871535cfe
commit
6fdf3cbb13
2 changed files with 2 additions and 2 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue