[Xcb] Small fix for http://xcb.freedesktop.org/XcbPythonBinding/

Pieter-Jan Busschaert pieterjan.busschaert at gmail.com
Tue Nov 4 05:01:07 PST 2014


Hi,

I just started experimenting with XCB through Python. I followed the
explanations and full example at
http://xcb.freedesktop.org/XcbPythonBinding/

There was 1 small edit I had to make, to get this to work:

The original full example has this line:

    conn.core.ChangeProperty(PropMode.Replace, window, xcb.XA_WM_NAME,
xcb.XA_STRING, 8, len(name), name)

which results in

AttributeError: 'module' object has no attribute 'XA_WM_NAME'


Changing it to the line below fixes the example:

    conn.core.ChangeProperty(PropMode.Replace, window, Atom.WM_NAME,
Atom.STRING, 8, len(name), name)



This is on Ubuntu 14.04, python 2.7.6, xpyb 1.3.1-1, libxcb 1.10-2


Kind regards,

Pieter-Jan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/xcb/attachments/20141104/bd59a6a9/attachment.html>


More information about the Xcb mailing list