Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I get a message box in Python 2.7.5

>>> from Tkinter import tkMessageBox

Traceback (most recent call last):
  File "<pyshell#0>", line 1, in <module>
    from Tkinter import tkMessageBox
ImportError: cannot import name tkMessageBox

I am getting this error, even though from Tkinter import * is working fine. I am using Python 2.7.5.

like image 598
Anshuman Avatar asked Jun 29 '13 12:06

Anshuman


1 Answers

tkMessageBox is a module on its own, so you should import it separately:

import Tkinter 
import tkMessageBox
like image 98
Andrei Avatar answered Oct 28 '22 00:10

Andrei