Re: subprocess.Popen objects: how to ensure that stdin is closed

2010-04-02 Thread Harishankar
On Fri, 02 Apr 2010 10:17:55 +, Harishankar wrote: > I am writing a small app which requires input using stdin to the > subprocess. > > I use the following technique: > > proc = subprocess.Popen (cmdargs, stdin=subprocess.PIPE) > > proc.stdin.write ("Something") > proc.stdin.flush () > ...

subprocess.Popen objects: how to ensure that stdin is closed

2010-04-02 Thread Harishankar
I am writing a small app which requires input using stdin to the subprocess. I use the following technique: proc = subprocess.Popen (cmdargs, stdin=subprocess.PIPE) proc.stdin.write ("Something") proc.stdin.flush () ... proc.stdin.write ("something else") proc.stdin.flush () ... and so on. I c