4

link text

When I do :

tkMessageBox.askquestion(title="Symbol Display",message="Is the symbol visible on the console")

along with Symbol Display window tk window is also coming.

If i press "Yes"...the child window return yes,whereas tk window remains there.

Whenever I am tryng to close tk window, End Program - tk comes. on pushing "End Now" button "pythonw.exe" window comes asking to send error report or not.

Why is it so ? How can I avoid tk window from popping out without affecting my script execution ???

Community
  • 1
  • 1
user46646
  • 153,461
  • 44
  • 78
  • 84

1 Answers1

5

The trick is to invoke withdraw on the Tk root top-level:

>>> import tkMessageBox, Tkinter
>>> Tkinter.Tk().withdraw()
>>> tkMessageBox.askquestion(
...     title="Symbol Display",
...     message="Is the symbol visible on the console")
krawyoti
  • 19,695
  • 1
  • 23
  • 17