gui related

Chris Rebert clp2 at rebertia.com
Thu Jun 10 05:53:37 EDT 2010


On Thu, Jun 10, 2010 at 2:38 AM, madhuri vio <madhuri.vio at gmail.com> wrote:
> in this program i tried..i am getting a name error...
>
> from Tkinter import*
> import Tkinter
>
> a = Tk()
> a.title ("TOOL")
> entry = Tkinter.Canvas(a)                            #creating the canvas
> under the root
> entry.pack()                                         #to call the packer
> geometry
> entry.create_rectangle(40,30,300,150,fill="white")
> b = Button(frame,text = "upload",fg="black",command = "browse")
> b.pack()
> c = Button(frame,text = "translate",fg="red",command = "still in progress")
> c.pack()
> d = Button(frame,text="exit",fg="green",command="bye")
> d.pack()
>
> a.mainloop()
>
>
>
>
> $ python newtool.py
> Traceback (most recent call last):
>   File "newtool.py", line 14, in <module>
>     b = Button(frame,text = "upload",fg="black",command = "browse")
> NameError: name 'frame' is not defined
>
>
> i didnt understand hw do i instantiate frame????

Read A Fine Tutorial:
http://www.pythonware.com/library/tkinter/introduction/x4822-patterns.htm

(After you're finished with "How To Ask Questions The Smart Way" of course)

Regards,
Chris
--
http://blog.rebertia.com



More information about the Python-list mailing list