Update regarding python-xlib

It’s been a while since I’ve written anything, partially because I’m lazy as hell, and partially because of school.  Yesterday and today I’ve gotten some work done on python-xlib, they can be found in my git repository here.  The link is to the experimental branch of python xlib.  For all intents and purposes the master branch *should* represent up to date svn, only in a (superior) git form.  I’ve improved the interface for dealing with Drawable(s) and Window(s) slightly (note: a Window IS A Drawable and therefore also has the same interface improvements as Drawable).

    • Drawable:

    • x: read only # x position of the drawable, pretty straightforward, also pretty useless for Pixmap drawables, but indisposable for Windows
    • y: read only # see above
    • position: read only #  same as (x, y) use this if you want both, as it’s quicker
    • width: read only # width of the drawable, useful for all drawables
    • height: read only # see above
    • size: read only # same as (width, height) performance benefits over using width and height individually
    • Window:

    • x, y, position, width, height: read/write # all of the same as for Drawable but also write enabled, as before size and position are faster than using width/height and x/y individually
    • children: read only # list of child Window(s)
    • root: read/write # root Window for this window
    • parent: read/write # parent Window.  setting this value will reparent the current window, and place it at 0, 0 in the parent window… this isn’t always desired, and in those cases should probably use Window.reparent_window() or whatever…

So I’ve accomplished enough that I feel accomplished, the property system is still in the works, however I think i’ve thought the implementation through enough…

I’ve also considered making a ChildArray class, which would essentially wrap the children of the window, so you could do things like window.children.append() window.children.extend() and the like, to allow even more natural syntax for python-xlib.

Update regarding python-xlib