[Tutor] Tkinter: no module named messagebox

brandon w thisisonlyatest at gmx.com
Sat Aug 13 22:08:40 CEST 2011

I have tried to follow the tutorial I found here:

Python 2.7 Tutorial

This is what I have done so far:


from Tkinter import *
import Tkinter.MessageBox

myapp = Tk()
myapp.title("This is the gui title")

I run it like this:

$ python tktest.py

I am getting the error message:

Traceback (most recent call last):
   File "tkwindow.py", line 12, in <module>
     import Tkinter.MessageBox
ImportError: No module named MessageBox

And then after changing the uppercase to lowercase this:

Traceback (most recent call last):
   File "tkwindow.py", line 12, in <module>
     import Tkinter.messagebox
ImportError: No module named messagebox

How do I find the modules in Tkinter?

I am running Python 2.6.6. It may be a little older and not have the 
messagebox module.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20110813/834cdfb8/attachment.html>

More information about the Tutor mailing list