Simulate input to another program

31337one at gmail.com 31337one at gmail.com
Thu Jul 27 14:42:38 EDT 2006


Hello everyone,

I am using a python script as a way to test another program that I have
written in C++. The program cannot be altered. It needs to stay the way
it is.

I need to simulate a few keystrokes to the application while it is
running. The application uses number keys and y and n to navigate a
basic menu.

Is there a way within python to simulate the keystrokes to this other
program.

Both the application and the python script are running in a terminal.

Thanks for all your help,

-E




More information about the Python-list mailing list