On 2011-05-04, Ian Kelly <ian.g.ke...@gmail.com> wrote: > On Wed, May 4, 2011 at 10:52 AM, Grant Edwards <invalid@invalid.invalid> > wrote: >> On 2011-05-04, Matty Sarro <msa...@gmail.com> wrote: >>> On Wed, May 4, 2011 at 12:34 PM, ETP <matthew.moorl...@gmail.com> 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. Quoting from >> the web page: >> >> ?"Pexpect does not currently work on the standard Windows Python" > > The OP said he was running Linux.
My bad. When I saw that he wanted to run a DOS program, I jumped to the conclusion he was running Windows and missed the part about puppy linux. > I gather the DOS program is being run in DOSBox or something similar. If it's running in a window as the OP claims, Pexpect still won't work since when DOSBox or DOSEmu runs in a window it isn't reading commands from a pty but rather from X11. If he can get the program to run on a pty (e.g. console or xterm or whatever) rather than in a window, then Pexpect should work. -- Grant Edwards grant.b.edwards Yow! Are we wet yet? at gmail.com -- http://mail.python.org/mailman/listinfo/python-list