In article <61cbd1cb-bd6d-49aa-818f-d28c46098...@x18g2000pro.googlegroups.com>, Jah_Alarm <jah.al...@gmail.com> wrote:
> I need to display a message box at the click of a button. I od the > following: > > from Tkinter import * > > def msg1(): > messagebox.showinfo(message='Have a good day') > > > Button(mainframe,text="About",command=msg1()).grid(column=360,row=36,sticky=W) > > I get the error msg 'global name 'messagebox' is not defined' > > When I try importing messagebox from Tkinter i get an error message > that this module doesn't exist. > > thanks Where did you find any reference to something called messagebox? The actual module name is tkMessageBox and it should be imported separately: import tkMessageBox tkMessageBox.showinfo(message='Have a good day') Should work that way. HTH - Eric - -- http://mail.python.org/mailman/listinfo/python-list