Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!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.003 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'wed,': 0.04; 'library,': 0.05; 'onto': 0.05; 'python': 0.07; 'created,': 0.09; 'loop.': 0.09; 'rename': 0.09; 'window?': 0.09; 'pm,': 0.11; 'linux': 0.11; 'wrote:': 0.14; 'input.': 0.16; 'lucid': 0.16; 'cc:no real name:2**0': 0.20; 'cc:2**0': 0.20; 'header:In-Reply-To:1': 0.22; 'cc:addr:python-list': 0.22; 'file,': 0.22; 'script.': 0.23; 'url:wiki': 0.24; 'windows': 0.26; 'url:mailman': 0.27; 'message- id:@mail.gmail.com': 0.28; 'direction': 0.29; 'probably': 0.30; 'cc:addr:python.org': 0.31; 'another': 0.32; 'url:listinfo': 0.33; 'example,': 0.33; 'implemented': 0.33; 'file': 0.35; 'interact': 0.35; 'getting': 0.36; 'url:python': 0.37; 'subject:with': 0.37; 'run': 0.37; 'received:google.com': 0.38; 'but': 0.38; 'url:org': 0.38; 'how': 0.39; 'would': 0.40; 'header:Received:5': 0.40; 'direct': 0.61; '2011': 0.62; 'subject:program': 0.68; '100': 0.70; 'puppy': 0.84; 'subject:Basic': 0.84; '\xc2\xa0it': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=pa5cuuX6vhEL8uF6xzpkB0SG4so2mfn+C2j2LMxHTl8=; b=rLgw9+9mmvojpZNCJ0fzGNAKryATjQnIZwr4xWY0uLoc0Pa94VFs60Rt0wHtkpLHnG zKiXhe/ohmiGF2S6Bx3kp3CnO/e/70sgZ9FwW3sS+aYcF0YN/9TrN+cxJs7TtCSK9sGD E5s1IKVyUFtiX4dfTtGbO6jhi/hIsFBm54Dfo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=VdfmZW1+BYlkmSX8B2txq+ZXVH46MlA6UgVgwlDv7l1jmOEPWUauYHhq6xzzX8luCN Y+GCGgq12ynZCwDfyKL53BjLbqCq+9EkxToOtIXVTAWcbK50hmh+3IynggU60WTGk2uy tG12Pe+eNyDMHuEzOqKG2BhHmBjhGkzc6ilSE= MIME-Version: 1.0 In-Reply-To: References: Date: Wed, 4 May 2011 12:39:41 -0400 Subject: Re: Basic interaction with another program From: Matty Sarro To: ETP Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: python-list@python.org X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 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: 26 NNTP-Posting-Host: 82.94.164.166 X-Trace: 1304527192 news.xs4all.nl 81485 [::ffff:82.94.164.166]:44536 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:4625 Look into the pexpect library, it'll make this easy as punch. http://www.noah.org/wiki/pexpect On Wed, May 4, 2011 at 12:34 PM, ETP wrote: > I have a dos program (run in a window) that I would like to control > with a script. =C2=A0It needs only text input. =C2=A0For example, I only = need to > tell it: > > L > u > 100 > u > > It will then wait for a file to be created, rename the file, then > loop. =C2=A0Simple. > > I'd like to run this on Lucid Puppy Linux as it will be implemented on > a very old laptop, but can probably deal with windows if needed. > > I only need direction on getting Python to interact with another > program; how do I get it to direct text onto another window? > -- > http://mail.python.org/mailman/listinfo/python-list >