i have created a running process which listens for input:
listen = Popen(["home/user/listen"], stdout=PIPE, stdin=PIPE)
It runs and awaits input from STDIN/STDOUT.
Unfortunately, it seems that I can’t execute anything I send to the process, i.e. like you would by pressing “Enter”, e.g.
listen.communicate("Test")
or
listen.stdout("Test")
Writes the string to STDOUT but doesn’t execute it, I have to press “Enter” manually. Any way to fix this?
P.S. I’m refering to http://docs.python.org/library/subprocess.html
I found a solution: