pexpect on windows - child process of another child process - quick question

Z W mpc8250 at gmail.com
Sat Mar 9 23:00:39 CET 2013


Hi All

We have a windows application to install on console mode typing on
cygwin shell "app.exe -i console"
On Windows process window, we could see this kicks a process named ia
which in turn kicks off ia_launcher to kick off another java.exe
process.
ie

app.exe -- kick off --> ia --> kicks off --> ia_launcher --kicks off
--> java.exe

We like to use pexpect to interact with the ia_launcher process, which
seems to control the stdin/stdout of its own shell window to allow
user to enter responses.
So far, our research shows most examples are related to use of direct
child process, in this case, app.exe process interacting with pexpect.

How do we go about using pexpect to talk to app.exe's grandchild's
shell window ?

We set Don L's expect example where he could "set id $spawn_id"
between direct child processes but it's still to us how we can
accomplish our goal.

Thanks for your kind help
Sincerely



More information about the Python-list mailing list