#!/usr/bin/env python import pygtk pygtk.require('2.0') import gtk import gnomeapplet def sample_factory(applet, iid): label = gtk.Label("Success!") applet.add(label) applet.show_all() return gtk.TRUE gnome.applet.bonobo_factory("OAFIID:GNOME_PysampleApplet_Factory", gnome.applet.Applet.__gtype__, "hello", "0", sample_factory)