#!/usr/bin/python

from gi.repository import Gtk, GObject

def button_clicked_cb(button):
        print "button clicked"

button = Gtk.Button("My Button")
button_sid = button.connect("clicked", button_clicked_cb)
print "Handler id for button '%s' is '%s'" % (button, button_sid)

GObject.signal_handler_is_connected(button, button_sid)
GObject.signal_handler_disconnect(button, button_sid)
GObject.signal_handler_is_connected(button, button_sid)
