[Idle-dev] [ idlefork-Bugs-661324 ] Does not play well with Tkinter when on-quit handler invoked

SourceForge.net noreply@sourceforge.net
Fri, 28 Feb 2003 18:18:22 -0800


Bugs item #661324, was opened at 2003-01-02 21:58
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=109579&aid=661324&group_id=9579

Category: None
Group: None
Status: Open
Resolution: Accepted
Priority: 5
Submitted By: Chui Tey (teyc)
Assigned to: Nobody/Anonymous (nobody)
Summary: Does not play well with Tkinter when on-quit handler invoked

Initial Comment:
The following program:

import Tkinter
import sys

root = Tkinter.Tk()

console = Tkinter.Button(root, text='Done', 
command=root.quit)
console.pack()

root.mainloop()

locks up the running program if "Done" is pressed. The 
program stops locking when the Shell window is closed.

I observed this behaviour on Windows 2000, running 
ASPN Python 2.2.

----------------------------------------------------------------------

Comment By: David Harris (edcdave)
Date: 2003-03-01 02:18

Message:
Logged In: YES 
user_id=72287

The same behavior occurs when the command is "sys.exit".

Since the 'Close Window' widget works correctly, I looked at 
the Tkinter source to learn what was different. But I didn't go 
very far before I encountered some example code in 
Tkinter.py which uses tk.destroy as the command (where 
tk=Tk()).

Once I change to "destroy", the given code exits correctly, 
erasing the window.

Windows XP. IdleFork 0.92a. Python 2.2.2

----------------------------------------------------------------------

Comment By: Kurt B. Kaiser (kbk)
Date: 2003-01-03 17:51

Message:
Logged In: YES 
user_id=149084

Confirmed on IDLEfork/Linux.  Code can be Run again, though,
don't need to close shell.   Is that true for Windows?

Same program crashes Python IDLE on second button press,
something about a Tk callback error.  Probably some kind of
self abuse issue?

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=109579&aid=661324&group_id=9579