from Tkinter import *

class App:
    def __init__(self, master):
        frame = Frame(master)
        frame.pack()

        self.label = Label(frame, text="quit", fg="red")
        self.label.pack(side=TOP)

        self.button = Button(frame, text="quit", fg="red", command=frame.quit)
        self.button.pack(side=LEFT)

        self.hi_there = Button(frame, text="Hello", command=self.say_hi)
        self.hi_there.pack(side=LEFT)

    def say_hi(self):
        print "hi there, everyone!"

root = Tk() #create basic window

app = App(root)
root.mainloop() #keep the windows showing
root.destroy()

@@ -111,16 +111,76 @@
 pack()%0A%0A
+        self.msg = StringVar()%0A        self.msg.set(%22test%22)%0A
         
@@ -201,39 +201,49 @@
 abel(frame, text
-=%22quit%22
+variable=self.msg
 , fg=%22red%22)%0A    
@@ -497,24 +497,25 @@
 side=LEFT)%0A%0A
+%0A
     def say_
@@ -524,16 +524,52 @@
 (self):%0A
+        self.msg.set(%22hello world%22)%0A
         
@@ -647,16 +647,41 @@
 p(root)%0A
+%0Aapp.msg.set(%22startup%22)%0A%0A
 root.mai

add class window main class app,update label text.