Re: Basic interaction with another program

2011-05-04 Thread ETP
Thanks everyone. I actually ran the program in question using Wine compatibility layer and it seemed to work fine. Terry, that looks like it could be useful, too. I'll give it a shot and let you guys know how it works. -- http://mail.python.org/mailman/listinfo/python-list

Re: Basic interaction with another program

2011-05-04 Thread Dan Stromberg
On Wed, May 4, 2011 at 9:34 AM, ETP wrote: > I have a dos program (run in a window) that I would like to control > with a script. It needs only text input. > > It will then wait for a file to be created, rename the file, then > loop. Simple. > Or not. > I'd like to run this on Lucid Puppy Li

Re: Basic interaction with another program

2011-05-04 Thread Terry Reedy
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 exampl

Re: Basic interaction with another program

2011-05-04 Thread Grant Edwards
On 2011-05-04, Ian Kelly wrote: > On Wed, May 4, 2011 at 10:52 AM, Grant Edwards > wrote: >> On 2011-05-04, Matty Sarro wrote: >>> 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. >> >>> Look into the pexpe

Re: Basic interaction with another program

2011-05-04 Thread Ian Kelly
On Wed, May 4, 2011 at 10:52 AM, Grant Edwards wrote: > On 2011-05-04, Matty Sarro wrote: >> 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. > >> Look into the pexpect library, it'll make this easy as punch. >

Re: Basic interaction with another program

2011-05-04 Thread Grant Edwards
On 2011-05-04, Matty Sarro wrote: > 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. > Look into the pexpect library, it'll make this easy as punch. I don't think pexpect is going to do the OP much good. Quot

Re: Basic interaction with another program

2011-05-04 Thread Matty Sarro
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.  It needs only text input.  For example, I only need to > tell it: > >

Basic interaction with another program

2011-05-04 Thread ETP
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 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