Re: subprocess.Popen() problem

2007-06-26 Thread 7stud
On Jun 26, 3:00 pm, "Jerry Hill" <[EMAIL PROTECTED]> wrote: > On 6/26/07, 7stud <[EMAIL PROTECTED]> wrote: > > > p.stdin.write("hello") > > You need to add the linefeed, otherwise your mytest.py process is > still waiting for you to finish typing. So, use this instead: > > p.stdin.write("hello\n")

Re: subprocess.Popen() problem

2007-06-26 Thread kyosohma
On Jun 26, 3:38 pm, 7stud <[EMAIL PROTECTED]> wrote: > I have this program: > > mytest.py > -- > myinput = raw_input("Enter input: ") > > if myinput == "hello": > print "goodbye" > -- > > and I want to execute it using subprocess.Popen(). I tried the > following but it

Re: subprocess.Popen() problem

2007-06-26 Thread Jerry Hill
On 6/26/07, 7stud <[EMAIL PROTECTED]> wrote: > p.stdin.write("hello") You need to add the linefeed, otherwise your mytest.py process is still waiting for you to finish typing. So, use this instead: p.stdin.write("hello\n") -- Jerry -- http://mail.python.org/mailman/listinfo/python-list

subprocess.Popen() problem

2007-06-26 Thread 7stud
I have this program: mytest.py -- myinput = raw_input("Enter input: ") if myinput == "hello": print "goodbye" -- and I want to execute it using subprocess.Popen(). I tried the following but it just hangs: --- import subprocess f = open("/Users/me/2testing/d