import gtk

def omg (button):
    for child in button.get_children ():
        button.remove (child)
    b = gtk.Button ("omg")
    b.connect ('clicked', omg)
    b.show ()
    button.add (b)
    w.set_focus (b)

w = gtk.Window ()
w.connect ('destroy', gtk.main_quit)
omg (w)
w.show ()

gtk.main ()
