summaryrefslogtreecommitdiffstats
path: root/Lib/subprocess.py
diff options
context:
space:
mode:
authorPeter Astrand <astrand@lysator.liu.se>2004-11-30 18:11:37 (GMT)
committerPeter Astrand <astrand@lysator.liu.se>2004-11-30 18:11:37 (GMT)
commit61daf0ba44f769cb6691dfe6dc1c1fc422bed67a (patch)
tree1cf25c13f761f7f2b1a92195176b998b01a2ba56 /Lib/subprocess.py
parent560f325fa129176f9581707dbf186d511f9822e0 (diff)
downloadcpython-61daf0ba44f769cb6691dfe6dc1c1fc422bed67a.zip
cpython-61daf0ba44f769cb6691dfe6dc1c1fc422bed67a.tar.gz
cpython-61daf0ba44f769cb6691dfe6dc1c1fc422bed67a.tar.bz2
Corrected example for replacing shell pipeline. Fixes bug 1073790.
Diffstat (limited to 'Lib/subprocess.py')
-rw-r--r--Lib/subprocess.py2
1 files changed, 1 insertions, 1 deletions
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]