Path: csiph.com!usenet.pasdenom.info!gegeweb.org!newsfeed.x-privat.org!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.055 X-Spam-Evidence: '*H*': 0.89; '*S*': 0.00; 'subject:question': 0.08; 'don': 0.09; 'subject:process': 0.09; '"set': 0.16; 'interacting': 0.16; 'subject:windows': 0.16; 'typing': 0.17; 'examples': 0.18; 'shell': 0.18; 'windows': 0.19; 'example': 0.23; 'seems': 0.23; 'message-id:@mail.gmail.com': 0.27; 'far,': 0.29; 'case,': 0.29; 'install': 0.29; 'related': 0.30; 'mode': 0.30; 'window': 0.30; 'expect': 0.31; 'could': 0.32; 'to:addr:python-list': 0.33; 'another': 0.33; 'received:google.com': 0.34; 'thanks': 0.34; 'process,': 0.35; 'but': 0.36; 'child': 0.36; 'turn': 0.36; 'talk': 0.38; 'shows': 0.38; 'to:addr:python.org': 0.39; 'application': 0.40; 'where': 0.40; 'help': 0.40; 'your': 0.60; 'sincerely': 0.60; 'most': 0.61; 'kind': 0.61; 'between': 0.63; 'our': 0.65; 'direct': 0.69; 'window,': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:date:message-id:subject:from:to :content-type; bh=6iZvqCTWee4mjkf2Be27vDg88ttX5q8bgiLsUs87XYk=; b=jTPUAGbHFzBTCooDUSNQ/JAx8XjG1sX9PV7D2eRxOQw42xeP+V5XVzi3JcK4Jw3VAU DA+TniuaG9gzzp1YNJ3Q/wbdPa/Kr6xi8TWtkEeNgMBZ5jBlQEsQ3u5O2vx0pnWVPlu0 aEZI7d23W37YT2JnxNjZ6aoA3vC4xdULZy7B0hArzIOzghQSZDXRK+9scVSeYoVohgqL 1LSTXRcK5V4wSrb9jhuGxAr4sbJtyQXAzVuWdB4NreLbm1bdyYTr0l0TrSaabJDkuRie dOb+/oLPXVK4fceLMVfp0m0MlUmVVcLed6Y76p2fGoN/jCEGBcR1+0bQeHMBipFWd1TM 93KA== MIME-Version: 1.0 X-Received: by 10.50.135.100 with SMTP id pr4mr3321225igb.37.1362866439157; Sat, 09 Mar 2013 14:00:39 -0800 (PST) Date: Sat, 9 Mar 2013 14:00:39 -0800 Subject: pexpect on windows - child process of another child process - quick question From: Z W To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 27 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1362866447 news.xs4all.nl 6849 [2001:888:2000:d::a6]:52229 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:40981 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