Skip to content

Instantly share code, notes, and snippets.

@raliste
Created October 7, 2011 03:19
Show Gist options
  • Save raliste/1269360 to your computer and use it in GitHub Desktop.
Save raliste/1269360 to your computer and use it in GitHub Desktop.
PyGTK 3
import sys
from gi.repository import Gtk
UI_FILE = 'src/your_application.ui'
class AppUI:
def __init__(self):
self.builder = Gtk.Builder()
self.builder.add_from_file(UI_FILE)
self.builder.connect_signals(self)
window = self.builder.get_object('window')
window.show_all()
def destroy(window, self):
Gtk.main_quit()
def main():
app = AppUI()
Gtk.main()
if __name__ == '__main__':
sys.exit(main())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment