from gi.repository import Gtk

class Handler:
  def ok_func(self, button):
    print "hello"

gui = Gtk.Builder()
gui.add_from_file('build.ui')
mainwin = gui.get_object('main_window')
gui.connect_signals(Handler())
mainwin.show_all()

Gtk.main()
