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


Groups > comp.lang.python > #4625

Re: Basic interaction with another program

References <c6e05be5-a863-43c2-827a-a91d369e3ef6@d26g2000prn.googlegroups.com>
Date 2011-05-04 12:39 -0400
Subject Re: Basic interaction with another program
From Matty Sarro <msarro@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.1156.1304527192.9059.python-list@python.org> (permalink)

Show all headers | 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