Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #4625

Re: Basic interaction with another program

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 <msarro@gmail.com>
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 <c6e05be5-a863-43c2-827a-a91d369e3ef6@d26g2000prn.googlegroups.com>
References <c6e05be5-a863-43c2-827a-a91d369e3ef6@d26g2000prn.googlegroups.com>
Date Wed, 4 May 2011 12:39:41 -0400
Subject Re: Basic interaction with another program
From Matty Sarro <msarro@gmail.com>
To ETP <matthew.moorland@gmail.com>
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 <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.1156.1304527192.9059.python-list@python.org> (permalink)
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

Show key headers only | View raw


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 <matthew.moorland@gmail.com> wrote:
> I have a dos program (run in a window) that I would like to control
> with a script.  It needs only text input.  For example, I only need to
> tell it:
>
> L
> u
> 100 <cr>
> u
>
> It will then wait for a file to be created, rename the file, then
> loop.  Simple.
>
> 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
>

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Basic interaction with another program ETP <matthew.moorland@gmail.com> - 2011-05-04 09:34 -0700
  Re: Basic interaction with another program Matty Sarro <msarro@gmail.com> - 2011-05-04 12:39 -0400
    Re: Basic interaction with another program Grant Edwards <invalid@invalid.invalid> - 2011-05-04 16:52 +0000
      Re: Basic interaction with another program Ian Kelly <ian.g.kelly@gmail.com> - 2011-05-04 11:30 -0600
        Re: Basic interaction with another program Grant Edwards <invalid@invalid.invalid> - 2011-05-04 18:07 +0000
  Re: Basic interaction with another program Terry Reedy <tjreedy@udel.edu> - 2011-05-04 15:15 -0400
    Re: Basic interaction with another program ETP <matthew.moorland@gmail.com> - 2011-05-04 15:21 -0700

csiph-web