def __init__(self):
    self.window = gtk.Window(gtk.WINDOW_TOPLEVEL)
self.window.set_icon_from_file('icon.png')
self.window.connect('delete_event', self.delete_event)
self.window.connect('destroy', self.destroy)
self.button = gtk.Button('Hello World')
self.window.add(self.button)
self.button.show()
self.window.show()

def main(self):
    gtk.main()
if __name__ == '__main__':
    hello = HelloWorld()
hello.main()
Добавление значка программы в Python GTK