I want to automate desktop activities in Windows environment using Python. How it can be done? Some examples will also be helpful.
By desktop activities, I mean actions such as taking control over mouse and keyboard, access active windows properties, double-click on an icon on the desktop, minimize and maximize windows, enter data to an input popup window through keyboard, etc.
Have a look at SIKULI.
Sikuli is a visual technology to automate and test graphical user interfaces (GUI) using images (screenshots).
SIKULI uses a very clever combination of taking screenshots, and embedding them into your python (it's jython, actually) script.
Take screenshots:
and use them in your code: