[Tutor] tkinter and messagebox

eryksun eryksun at gmail.com
Sat Mar 30 01:17:51 CET 2013


On Fri, Mar 29, 2013 at 8:00 PM, Clyde Wilson <clydew at clydew.org> wrote:
>
> from tkinter import *
> root=Tk()
> main=Frame(root)
> main.grid()
> def doit():
>     messagebox.showinfo("Hello")

You have to import the module first:

    from tkinter import messagebox

http://hg.python.org/cpython/file/bd8afb90ebf2/Lib/tkinter


More information about the Tutor mailing list