[Tutor] A problem with a Tkinter program (using the text widget)

Mark Kels mark.kels at gmail.com
Sat Feb 5 18:19:04 CET 2005


Hi all.
Whats wrong here ?? :
from Tkinter import *
def p_text():
    print text.get()
root=Tk()
text=Text(root).pack()
button=Button(root,text="Click here!!",command=p_text).pack()
root.mainloop()

I get an error that says that nontype object has no attribute 'get'...
whats wrong ??

Thanks.


-- 
1. The day Microsoft makes something that doesn't suck is probably the
day they start making vacuum cleaners.
2. Unix is user friendly - it's just picky about it's friends.
3. Documentation is like sex: when it is good, it is very, very good.
And when it is bad, it is better than nothing. - Dick Brandon


More information about the Tutor mailing list