We Recommend

Learning Python Learning Python
The authors of Learning Python show you enough essentials of the Python scripting language to enable you to begin solving problems right away, then reveal more powerful aspects of the language one at a time. This approach is sure to appeal to programmers and system administrators who have urgent problems and a preference for learning by semi-guided experimentation.


Posted By

arcturus on 11/02/07


Tagged

python gtk pygtk glade


Versions (?)


Basic glade file load


Published in: Python 


  1. class MyGUI:
  2. """ Main class for this application (holds the GUI) """
  3. def __init__ (self):
  4. self.tree = gtk.glade.XML("myGui.glade")
  5. self.tree.signal_autoconnect(self)
  6.  
  7. def on_mywindow_delete (self, widget, dummy):
  8. gtk.main_quit()
  9.  
  10. if __name__ == "__main__":
  11. h = MyGUI()
  12. gtk.main()

Report this snippet 

You need to login to post a comment.