Python >> PyGtk
hello, world!
參考資訊:
1. ptgtk
2. tutorialspoint
3. pygtk-tutorial.pdf
main.py
import gtk class PyApp(gtk.Window): def __init__(self): super(PyApp, self).__init__() self.set_default_size(200, 100) self.set_title("PyGtk") label = gtk.Label("Hello, world") self.add(label) self.show_all() PyApp() gtk.main()
執行
$ python ./main.py