Skip to content

Instantly share code, notes, and snippets.

@aalinat
Created March 18, 2012 19:02
Show Gist options
  • Save aalinat/2079861 to your computer and use it in GitHub Desktop.
Save aalinat/2079861 to your computer and use it in GitHub Desktop.
pygtk basic window
import pygtk
pygtk.require('2.0')
import gtk
import os
class Podcaster:
wTree = None
def __init__( self ):
self.window = gtk.Window(gtk.WINDOW_TOPLEVEL)
self.window.connect("destroy", self.destroy)
self.window.set_default_size(300,300)
self.button = gtk.Button("Hello World")
self.window.add(self.button)
self.window.set_border_width(10)
self.window.show_all()
def main(self):
gtk.main()
def destroy(self, widget, data=None):
gtk.main_quit()
if __name__ == "__main__":
podcaster = Podcaster()
podcaster.main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment