Tkinter tkMessageBox problem - message box is displayed with an additional window

dudeja.rajat at dudeja.rajat at
Thu Aug 28 15:29:29 CEST 2008

I'm working on Windows Platform

I'm facing some problem with the tkMessageBox. My code is as below:

import tkMessageBox
import Tix
from Tkinter import *

if len(installedLibPath) != len(listOfLibraries):
        if tkMessageBox.askyesno("Question", \
                                 type='yesno', icon='warning', \
                                 message="Some of the libraries are
not installed. Do you wish to continue with the remaining?"):
        myRoot = Tix.Tk()
        myAppGUIObject = myAppGUI(myRoot)    #Class for my GUI

The Message Box is called before the Tix.Tk mainloop(). The problems
are as under :

1. Since the message box is displayed before the mainloop() is
started, the message box is displayed with another window that is
blank. This should not be displayed.

2. As a results of this messagebox (called before the mainloop) the
original Gui started by mainloop doesnot work as desired. Some of the
checkbuttons are displayed as unset (i.e un-ticked). These
checkbuttons used to be set at initialization before I stared using
this messagebox.

Please help.

Thanks and regards,

More information about the Python-list mailing list