<br><br><div class="gmail_quote">:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">import tkinter<br><br>root = tkinter.Tk() #initialize tkinter and get a top level instance<br>
root.title("madhuri is a python")<br>canvas = tkinter.Canvas(root) #creating the canvas under the root<br>canvas.pack() #to call the packer geometry<br>
canvas.create_rectangle(20,10,120,80,fill=colors[0])<br>root.close()<br>tk.destroy()<br><br><br>this is the program i have written and i am unable to execute it as i <br>get an attribute error like this...<br><br>$ python tkinter.py<br>

Traceback (most recent call last):<br>  File "tkinter.py", line 4, in <module><br>    import tkinter<br>  File "/home/manoj/tkinter.py", line 6, in <module><br>    root = <a href="http://tkinter.tk" target="_blank">tkinter.tk</a>() #initialize tkinter and get a top level instance<br>

AttributeError: 'module' object has no attribute 'tk'<br><br>where is the mistake and what do i do ???its a ll urgent<br><br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br> 
 <br></blockquote></div></blockquote></div><br>