Hi, Maybe something like this...
from Tkinter import * import itertools class Application(Frame): def __init__(self, master=None): Frame.__init__(self, master) self.grid() self.createWidgets() def createWidgets(self): self.stop = Button(self,text='Emergency Stop!',command=self.stop) self.count = Button(self,text='Count',command=self.count) self.count.grid(row=0,column=0) self.stop. grid(row=0,column=1) def count(self): self._counter = itertools.count() self._id = self.after(0, self._count) def _count(self, event=None): i = self._counter.next() print i self.update_idletasks() self._id = self.after(0, self._count) def stop(self): self.after_cancel(self._id) app = Application() app.mainloop() On Mon, 24 Jan 2005 16:52:51 +1100 "Chris Line" <[EMAIL PROTECTED]> wrote: > -- > http://mail.python.org/mailman/listinfo/python-list -- http://mail.python.org/mailman/listinfo/python-list