# HelloSimpleGTK.py (c) Kari Laitinen # http://www.naturalprogramming.com # 2006-10-05 File created. # 2006-10-05 Last modification. # Inside the window of this program, a gtk.Label object represents # the text that is being shown. import gtk class SimpleHelloApplication : def __init__( self ) : self.application_window = gtk.Window( gtk.WINDOW_TOPLEVEL ) self.application_window.connect( "destroy", gtk.main_quit ) self.application_window.set_size_request( 400, 250 ) text_in_window = gtk.Label( "Hello. I am a simple Python/GTK/Linux application." ) self.application_window.add( text_in_window ) self.application_window.show_all() def run( self ) : gtk.main() if __name__ == "__main__" : this_application = SimpleHelloApplication() this_application.run()