Basic interaction with another program

Terry Reedy tjreedy at udel.edu
Wed May 4 15:15:24 EDT 2011


On 5/4/2011 12:34 PM, ETP wrote:
> I have a dos program (run in a window) that I would like to control
> with a script.

Look at the subprocess module. You may have to (and be able to) have it 
start up the window program with the dos program as an argument.

   It needs only text input.  For example, I only need to
> tell it:
>
> L
> u
> 100<cr>
> u
>

You should be able to send this through a pipe connected to the subprocess.


-- 
Terry Jan Reedy




More information about the Python-list mailing list