How to get a window ID in linux using python?

Paul Boddie paul at boddie.org.uk
Wed Jun 3 06:39:42 EDT 2009


On 3 Jun, 10:58, "Martin v. Löwis" <mar... at v.loewis.de> wrote:
> > In Linux, we can get window info by executing 'xwininfo' and then
> > selecting the desired window manually. Can this be done automatically
> > in python?
>
> You can run "xwininfo -tree -root", and then parse the output.

The desktop.windows module provides some support for inspecting
windows under X11. Here's the repository for the desktop package:

https://hg.boddie.org.uk/desktop

Looking at the time since the last release, maybe it's time to make
another release with the most recent fixes, especially since I've just
spotted something which would probably obstruct the operation of the
module when performing the work required in this case.

Paul



More information about the Python-list mailing list