[Tutor] help with Tkinter, please

Alan Gauld alan.gauld at btinternet.com
Thu Nov 23 22:37:02 CET 2006


"Dick Moores" <rdm at rcblue.com> wrote 

> def compute_fact():
>         value = int(entry_get())

>   File "factTk1-a.py", line 22, in compute_fact
>     value = int(entry_get())
> NameError: global name 'entry_get' is not defined
> 
> I'm so dumb I don't see how to define it.

get is a method of the Entry widget.
So the syntax is entry.get() not entry_get.

HTH,

Alan G.



More information about the Tutor mailing list