help me

madhuri vio madhuri.vio at gmail.com
Wed Jun 9 03:18:11 EDT 2010


this is the code i have written ..even after changing d module name
i am still getting the same error...
what do they mean by an attribute error...can u explain in detail i am
unable to
proceed further...

#!usr/bin/env python
#making structured graphics using tkinter interface....

import tkinter


a = tkinter.Tk()                                      #initialize tkinter
and g$
a.title("madhuri is a python")
canvas = tkinter.Canvas(a)                            #creating the canvas
unde$
canvas.pack()                                         #to call the packer
geome$
canvas.create_rectangle(20,10,120,80,fill=colors[0])
a.close()


and the error is ....

$ python madhu.py
Traceback (most recent call last):
  File "madhu.py", line 4, in <module>
    import tkinter
  File "/home/manoj/tkinter.py", line 6, in <module>
    root = tkinter.Tk() #initialize tkinter and get a top level instance
AttributeError: 'module' object has no attribute 'Tk'


its a lil urgent please


-- 
madhuri :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20100609/d086d714/attachment.html>


More information about the Python-list mailing list