Thursday, June 10, 2010

PyGI in Maverick

PyGI is now available in Maverick, you can install it with the following:

$ apt-get install python-gi gir1.0-gtk-2.0

and then write applications like this:

from gi.repository import Gtk

def destroy_cb(widget):

w = Gtk.Window()
w.connect('destroy', destroy_cb)

l = Gtk.Label()
l.set_text("Hello World!")


Have fun!

EDIT: Updated to note you need to install the GI package for the module you are using.
Post a Comment