PyGTK

De Banane Atomic
Révision datée du 9 mars 2017 à 13:29 par Nicolas (discussion | contributions)
(diff) ← Version précédente | Voir la version actuelle (diff) | Version suivante → (diff)
Aller à la navigationAller à la recherche

pyGTK

pyGTK fonctionne avec python2.
Pour python3 voir PyGObject
Python.svg
import gtk

class MainWindow:
    def __init__(self):
        self.window = gtk.Window(gtk.WINDOW_TOPLEVEL)
        self.window.show_all()
        self.window.connect("destroy", gtk.main_quit)
        gtk.main()
 
# Signals from Glade
    def on_ok_clicked(self, widget):
        gtk.main_quit()
 
if __name__ == "__main__":
    window = MainWindow()