Emulating keyboard events
Richard Wilson
relw at mchsi.com
Tue Mar 20 00:01:39 MST 2007
On Fri, 2007-03-16 at 01:50 -0700, David Huerta wrote:
> I'm writing a small python app that I want to emulating pressing the
> "5" keyboard key, but after some searching online it was suggested
> this sort of thing would only be possible in C or C++ using X Windows
> libraries. I'm not sure where to start, would anyone here be familiar
> with emulating keyboard events in Linux?
>
I can't speak to the Python end of things but when it comes to emulating
an interactive user, I have had a lot of success with Expect. For
example, one Expect script I wrote cheerfully updates a user's password
on 85 servers in a few minutes (interactive response times do apply, as
do a bunch of security restrictions that prevent me from using other
tools...)
HTH,
Richard Wilson
More information about the PLUG-discuss
mailing list