diff options
-rw-r--r-- | Doc/lib/libsubprocess.tex | 2 | ||||
-rw-r--r-- | Lib/subprocess.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Doc/lib/libsubprocess.tex b/Doc/lib/libsubprocess.tex index 01f64ae..77bd83e 100644 --- a/Doc/lib/libsubprocess.tex +++ b/Doc/lib/libsubprocess.tex @@ -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} diff --git a/Lib/subprocess.py b/Lib/subprocess.py index db19d1f..8d0204e 100644 --- a/Lib/subprocess.py +++ b/Lib/subprocess.py @@ -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] |