#!/usr/bin/env python # -*- coding: UTF8 -*- # Python module project1.py # Autogenerated from project1.glade # Generated on Sat Jul 2 21:27:36 2005 # Warning: Do not modify any context comment such as #-- # They are required to keep user's code import os import gtk from SimpleGladeApp import SimpleGladeApp from SimpleGladeApp import bindtextdomain app_name = "project1" app_version = "0.0.1" glade_dir = "" locale_dir = "" bindtextdomain(app_name, locale_dir) class Window1(SimpleGladeApp): def __init__(self, path="project1.glade", root="window1", domain=app_name, **kwargs): path = os.path.join(glade_dir, path) SimpleGladeApp.__init__(self, path, root, domain, **kwargs) #-- Window1.new { def new(self): pass #pass means no code so we do nothing when the window is created #-- Window1.new } #-- Window1 custom methods { # Write your own methods here #-- Window1 custom methods } #-- Window1.on_button1_clicked { def on_button1_clicked(self, widget, *args): text = self.entry1.get_text() #get the text from entry1 self.label1.set_text(text) #set the text to label1 #-- Window1.on_button1_clicked } #-- main { def main(): window1 = Window1() window1.run() if __name__ == "__main__": main() #-- main }