Re: [Tutor] tkinter and messagebox

2013-03-29 Thread eryksun
On Fri, Mar 29, 2013 at 8:00 PM, Clyde Wilson 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

[Tutor] tkinter and messagebox

2013-03-29 Thread Clyde Wilson
The following code works fine under IDLE but errors when run as a standalone:   from tkinter import * root=Tk() main=Frame(root) main.grid() def doit():     messagebox.showinfo("Hello") btn1=Button(main,width=10,text="In") btn1.grid() lbl1=Label(main) lbl1.grid() btn2=Button(main,width=10,text="Out