File: /tmp/pygtk Example - Py Page 1 of 1
File: /tmp/pygtk Example - Py Page 1 of 1
py Page 1 of 1
#!/usr/bin/python
import pygtk
pygtk.require('2.0')
import gtk
class HelloWorld:
def __init__(self):
self.window = gtk.Window(gtk.WINDOW_TOPLEVEL)
self.window.set_border_width(10)
self.window.connect("delete_event", self.delete_event)
self.window.connect("destroy", self.destroy)
self.window.add(self.button)
self.window.show_all()
return False
def main(self):
gtk.main()
if __name__ == "__main__":
hello = HelloWorld()
hello.main()