Re: [Tutor] Difficulty with the subprocess module

2007-03-02 Thread Alan Gauld
"Dhiraj Sharma" <[EMAIL PROTECTED]> wrote > > p = subprocess.Popen("cat", buffer=0, stdin=subprocess.PIPE, > stdout=subprocess.PIPE, stderr=subprocess.STDOUT) > > fdata = open('input'); > for l in fdata: > p.stdin.write(l) > m = p.stdout.readline() >

[Tutor] Difficulty with the subprocess module

2007-03-01 Thread Dhiraj Sharma
I am using the subprocess module to capture the input/output of a process on a Windows machine with Python 2.5 and ran into a puzzling problem. The following works well: p = subprocess.Popen("cat", buffer=0, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subproc