Date Tags Python

I’ve recently been playing with pygobject and gobject-introspection. There’s currently a GSoC project for this, Simon Van Der Linden is working on this, and I must say, progressing fast!

Simon does the work on a pygobject branch and also wrote some patches for glib.

Here’s a little g-i Clutter code sample, just to show how easy it is to use the runtime bindings:

import sys
import pygtk

from gi.repository import  Clutter


stage = Clutter.Stage()
stage.set_size(200, 200)
stage.set_color(Clutter.Color(0, 0, 0, 255))


Pretty self-explanatory, create an empty stage and show it. That’s quite cool, this new pygobject version will potentially allow Python developers to directly use libraries like Gtk, GStreamer, Clutter and the like without the need of specific bindings.

I have some more examples in a gist. The animation example doesn’t work yet because gi doesn’t know how to marshal python callable arguments, but… it’s getting there! Many kudos to Simon, keep up the good work!


comments powered by Disqus