Re: subprocess query

2010-07-03 Thread Nobody
On Sat, 03 Jul 2010 10:33:49 -0400, Sudheer wrote: > What's wrong with the following code. The program waits indefenitely > at 'output = p2.stdout.read()' > > > from subprocess import * > > p1=Popen(['tr', 'a-z', 'A-Z'],stdin=PIPE,stdout=PIPE) > p2=Popen(['tr','A-Z', 'a-z'],stdin=p1.stdout,st

Re: subprocess query

2010-07-03 Thread Chris Rebert
On Sat, Jul 3, 2010 at 7:33 AM, Sudheer wrote: > Hi, >  What's wrong with the following code. The program waits indefenitely > at  'output = p2.stdout.read()' > > > from subprocess import * > > p1=Popen(['tr', 'a-z', 'A-Z'],stdin=PIPE,stdout=PIPE) > p2=Popen(['tr','A-Z', 'a-z'],stdin=p1.stdout,std

subprocess query

2010-07-03 Thread Sudheer
Hi, What's wrong with the following code. The program waits indefenitely at 'output = p2.stdout.read()' from subprocess import * p1=Popen(['tr', 'a-z', 'A-Z'],stdin=PIPE,stdout=PIPE) p2=Popen(['tr','A-Z', 'a-z'],stdin=p1.stdout,stdout=PIPE) p1.stdin.write("hello") p1.stdin.close() output = p2