Question about Tkinter message boxes

Graham Ashton graz at
Fri Oct 26 12:50:34 CEST 2001

In article <3B7D5BA4.69A8C2EC at>, "Joseph Andrew Knapka"
<jknapka at> wrote:

> Mike Callahan wrote:
>> When I run this code:
>> import tkMessageBox as tkM
>> tkM.showerror('Error', 'Test messgage')
>> I get two windows. A blank Tk box and the error box. When I click on OK
>> in the error box, the blank Tk box remains. How do I keep the blank Tk
>> box from appearing?
>> Mike Callahan
> Tk will always create a root window whether you want one or not. You can
> create it explicitly and then hide it at the beginning of your program:
> root = Tkinter.Tk()
> root.withdraw()

Have you tried this:

from Tkinter import *


More information about the Python-list mailing list