I am writing a desktop usage statistics app. It runs a background daemon which wakes up at regular intervals, finds the name of the application window currently in focus and logs that data in database.
I manage to do this on Linux desktop with help of xprop utility (you can find it here).
How can I do the same on Mac OSX? Is there a direct/indirect way to do this from a python script? (PyObjC?)