pywinauto is a set of python modules to automate the Microsoft Windows GUI. At it’s simplest it allows you to send mouse and keyboard actions to windows dialogs and controls.
Is there a linux-equivalent of this python module?
The linux desktop testing project (ldtp) should offer what you need. With the python-ldtp package, you can write scripts in python. The project uses the accessibility methods to perform actions, so the application in question has to be a “standard” GTK/QT/… application and you need to enable accessibility (“Assistive technologies”).
The following python script would click the “New” button in an (already existing) gedit window and enter the string “foo”:
You can use Sikuli (now named SikuliX)
According to the website:
Please bare in mind that it's in beta.