[Tutor] A problem with a Tkinter program (using the text widget)
kent37 at tds.net
Sat Feb 5 20:12:27 CET 2005
Mark Kels wrote:
> Hi all.
> Whats wrong here ?? :
> from Tkinter import *
> def p_text():
> print text.get()
pack() doesn't return a value. You have to do
text = Text(root)
I've been bitten by this one more than once myself :-(
> button=Button(root,text="Click here!!",command=p_text).pack()
> I get an error that says that nontype object has no attribute 'get'...
> whats wrong ??
More information about the Tutor