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")
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
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
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