[Pythonmac-SIG] Using Tkinter with 2.1.1
Schollnick, Benjamin
Benjamin.Schollnick@usa.xerox.com
Mon, 10 Dec 2001 07:54:35 -0500
Martin,
Unfornately, this problem is the same one I was having...
It's a Tkinter issue, and as far as I know, I doubt we will
see a resolution to it...
Basically, from the MacTCL list, what happening is that the
Tkinter library can't be loaded twice....
The people on the MacTCL list say that this is proper behavior,
so the only likely fix, is that somehow MacPython is patched
around this behavior....
- Benjamin
-----Original Message-----
From: Martin Miller [mailto:mmiller@adobe.com]
Sent: Friday, December 07, 2001 5:12 PM
To: pythonmac-sig
Subject: [Pythonmac-SIG] Using Tkinter with 2.1.1
Hello, I am a Python/PythonMac newbie and have encountered a problem
re-running scripts in the Python IDE that use the Tkinter module. They
will work the first time I click the "run all" button (assuming there
were no programming mistakes made ;-) but not the second time I do it.
Instead I get the following error message:
> Menu ID 256 is already in use!Fatal Python error: Tcl/Tk panic
and the IDE locks up. All I can do at that point is option-cmd-esc and
click the "Force Quit" button.
Here's a script that exhibits the problem:
> import Tkinter
> widget = Tkinter.Label(None, text="Hello World!")
> widget.pack()
> widget.mainloop()
I tried adding a "del Tkinter" statement at the end but that did not
help the problem.
Is there something I must do to allow such a script to be rerun without
Quitting, restarting the IDE, and then reopening the script?
Thanks in advance.
Martin
_______________________________________________
Pythonmac-SIG maillist - Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig