sending keystroke to a dos application
Adrian Eyre
a.eyre at optichrome.com
Mon Jan 31 06:45:22 EST 2000
> I have a dos application that runs in a dos window under NT or win98 that
> takes interactive input. Basically numbers to choose from menu items and
> return keys. I have not found a method to script this application by
> sending keystrokes to the dos window. Is there a any possibility
> to do this with python?
Providing you don't actually need this app to run on MS-DOS, but just
98/NT in a DOS box, you can use:
import msvcrt
key = msvcrt.getch()
...to get a single keystroke.
--------------------------------------------
Adrian Eyre <a.eyre at optichrome.com>
http://www.optichrome.com
More information about the Python-list
mailing list