Created
March 18, 2012 19:02
-
-
Save aalinat/2079861 to your computer and use it in GitHub Desktop.
pygtk basic window
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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