Spanki opened this issue on Mar 29, 2008 ยท 8 posts
adp001 posted Sun, 30 March 2008 at 10:01 AM
Maybe this will help to find a solution for your app:
import Tkinter as Tk
def stopPressed(): # reset Poser events here app.cancel=True app.destroy() app=Tk.Tk() app.cancel=False btn=Tk.Button(app,text="press to stop",command=stopPressed) btn.pack() app.update() # Insert your standard app here. # call app.update() from time to time and check # app.cancel. import math for i in range(1000000) : # heavy work to do - the following makes no sense :) x=i*math.sin(i/100000.0)+math.acos(i/100000.0) app.update() if app.cancel : break for j in range(1000000) : y=x*math.cos(j/100000.0)