simple Tkinter question

Tom Adelman ta16 at cornell.edu
Fri May 28 21:35:34 EDT 1999


    I've just started to work with Tkinter and am having some trouble.
In interactive mode I type

import tkMessageBox
tkMessageBox.askyesno()

When this runs it pops up two windows, an empty tk window and the yes/no
dialog.  My problem is the empty tk window.  If ever I close this tk
window I can never run tkMessageBox.askyesno() again, or I get the
traceback,

Traceback (innermost last):
  File "<pyshell#13>", line 1, in ?
    tkMessageBox.askyesno()
  File "D:\Program Files\python\Lib\lib-tk\tkMessageBox.py", line 100,
in askyesno
    s = apply(_show, (title, message, QUESTION, YESNO), options)
  File "D:\Program Files\python\Lib\lib-tk\tkMessageBox.py", line 75, in
_show
    return apply(Message, (), options).show()
  File "D:\Program Files\python\Lib\lib-tk\tkCommonDialog.py", line 49,
in show
    w = Frame(self.master)
  File "D:\Program Files\python\Lib\lib-tk\Tkinter.py", line 1406, in
__init__
    Widget.__init__(self, master, 'frame', cnf, {}, extra)
  File "D:\Program Files\python\Lib\lib-tk\Tkinter.py", line 1084, in
__init__
    self.tk.call(
TclError: can't invoke "frame" command:  application has been destroyed


    Thanks for any advice.
    Tom







More information about the Python-list mailing list