Hackfest Helps Advance Python Support in Gnome

Ryan Paul at Ars Technica has an excellent write up of a hackfest sponsored by OLPC to start implementing a plan to ease the future maintenance of the Python bindings for GTK+. The OLPC project makes considerable use of both Python and GTK+.

The plan is to incrementally phase in new bindings that take advantage of GObject introspection alongside the hand rolled bindings. The new implementation, PyGI, is off to a good start and will eventually replace PyGTK. I believe it depends on Python 3.0, so adoption of the latest version of the language would also be key.

As Paul clearly explains, GObject introspection eases the work required to build and maintain bindings by producing XML interface descriptions based on specially formatted comments in the GTK+ sources, written in C. This XML can then be used to generate the mapping between GTK+ and the idioms and models of the target language. Vala, which I’ve written about before, already makes use of GObject introspection, as do two sets of JavaScript bindings. One of those, Seed, I’ve also mentioned on the blog previously.

I am glad to see Paul emphasizing how GObject introspection will reduce the cost of bindings for high level languages and strongly but indirectly encourage GTK+ hacking by developers of all stripes, at all levels of skill and experience.

Leave a Reply

Your email address will not be published. Required fields are marked *