Talking through pipes interactively (on win32)
eric.brunel at pragmadev.N0SP4M.com
Mon Nov 10 15:33:24 CET 2003
Jane Austine wrote:
> I need to control a command line program via python.
> I first tried popen2 and 3 but I couldn't find a way to talk to the
> subprocess interactively; that is, read some and then write some, and
> read some more again... (suppose controlling an interactive shell
> program) When I try this with popen family, it just hangs. I have to
> close one pipe before reading from the other.
> I know that there is a wonderful thing called Expect, but it's not
> available on my machine(win32).
> Can anyone help me out?
Can you please post a small script showing the exact problem you have?
Communicating with a program via pipes works on Windows: we do it all the time.
It can be pretty complicated, but it can be done.
- Eric Brunel <eric dot brunel at pragmadev dot com> -
PragmaDev : Real Time Software Development Tools - http://www.pragmadev.com
More information about the Python-list