sir

madhuri vio madhuri.vio at gmail.com
Wed Jun 9 04:08:36 EDT 2010


i am working on linux sir
#!usr/bin/env python
#making structured graphics using tkinter interface....

import tkinter


a = tkinter.Tk()                                      #initialize tkinter
and get a top level instance
a.title("madhuri is a python")
canvas = tkinter.Canvas(a)                            #creating the canvas
under the root
canvas.pack()                                         #to call the packer
geometry
canvas.create_rectangle(20,10,120,80,fill=colors[0])
a.close()


and the error is like...
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'

kindly let me know so that i can create a front end and proceed..what do
they mean by attribute error????
-- 
madhuri :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20100609/453cd358/attachment-0001.html>


More information about the Python-list mailing list