diff Lib/subprocess.py @ 34051:8cecb8dc43a3 2.4

Corrected example for replacing shell pipeline. Fixes bug 1073790.
author Peter Astrand <astrand@lysator.liu.se>
date Tue, 30 Nov 2004 18:11:37 +0000
parents 66223a9ebe48
children 79d2ae0a62ef
line wrap: on
line diff
--- a/Lib/subprocess.py	Tue Nov 30 13:16:58 2004 +0000
+++ b/Lib/subprocess.py	Tue Nov 30 18:11:37 2004 +0000
@@ -229,7 +229,7 @@
 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]