i'm trying to get user input from a Tkinter Entry field...

Steve Holden sholden at holdenweb.com
Tue Jul 3 21:50:26 EDT 2001


"G. Willoughby" <thecalm at NOSPAM.btinternet.com> wrote in message
news:9htlpd$ki$1 at plutonium.btinternet.com...
> i'm trying to get user input from a Tkinter Entry field, this is the code
i
> am using:
>
> [snip...]
>
> def getNew():
>     result1=str(newName.get())
>     print result1
>
> [snip...]
>
> Button(frame1, text="Add New Entry", command=getNew).grid(row=0,column=0)
> newName=Entry(frame1).grid(row=1,column=0)
>
> [snip...]
>
> it somehow doesn't work, any ideas?
>
Yes. It's clear that something is wrong with your program.

> P.S. no classes are used anywhere in this program.
>
Sorry to be unhelpful, but the exact nature of the error would require
psychic Python debugging abilities beyond the range of this ordinary mortal.
I presume the print statement doesn't print anything? Any other clues?

Perhaps you posted snippets because it's a long program. If so, reduce it to
essentials and post the whole thing (assuming it still exhibits the problem
behavior).

Good luck
 Steve
--
http://www.holdenweb.com/






More information about the Python-list mailing list