Можно вот так делать, или неправильно?
Как надо?
from Tkinter import *
root = Tk()
class Gui:
def __init__(self, runner):
self.runner = runner
def draw(self):
fr = Frame(root)
fr.pack(side=TOP)
self.bt = Button(fr, text='run', command=self.uni)
self.bt.pack(side=LEFT)
self.en = Entry(fr)
self.en.pack(side=RIGHT)
self.en.insert(0, 'poop')
def uni(self):
self.runner(self.en.get())
class Run:
def __call__(self, arg):
print arg
for i in range(5):
Gui(Run()).draw()
root.mainloop()