Basic interaction with another program

Dan Stromberg drsalists at gmail.com
Wed May 4 16:24:10 EDT 2011


On Wed, May 4, 2011 at 9:34 AM, ETP <matthew.moorland at 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.
>
> 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 Linux as it will be implemented on
> a very old laptop, but can probably deal with windows if needed.
>

Easiest would probably be to do this on Windows - not because of any
inherent value in Windows, but because Microsoft limited what you could do
to protect their own interests.

I believe I once encountered a DOS emulator that could give curses output
for non-graphical (no CGA, Hercules, EGA, or VGA) applications.  It was ages
ago.  It probably was on SCO Xenix.

You could try one of these, and then talk to your program over a serial
port:
http://en.wikipedia.org/wiki/PC_Weasel_2000
...but I wouldn't count on it working well on a laptop.

You could possibly set up a DOS box somewhere, and access it over a network
from your laptop - depending on how the DOS program is doing its I/O.  If
it's writing directly to video RAM, good luck (other than the PC Weasel
option), but if it's disciplined enough to use DOS or the BIOS for I/O, it
might work pretty well.

Your best option, if legally and economically viable, would be to get the
source code to your DOS app and port it (or have it ported) to Linux.  Back
in the DOS days, Some programs were surprisingly easily ported to *ix.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20110504/a44913d1/attachment-0001.html>


More information about the Python-list mailing list