get() in Tkinter

Andrew M stopviequesbombing at hotmail.com
Fri Aug 30 21:08:05 EDT 2002


I have a (newbie) question about the Tkinter toolkit. I want to have an
event that takes the text from an Entry widget, changes it, and then
replaces that in the Entry widget. I have the interface completed, however,
I need help with the get() function. For the record, I looked at the Library
reference but couldn't find the get() function in particular without finding
the dictionary one. My code right now looks something like this:

from Tkinter import *

# ---interface part cut out---

def changetext():
        a = str(Entry.get(entrybox1))
        b = a + " ....continue"
        Entry.insert(b)

I know this doesn't work, and I think it is the Entry.Insert line. I would
appreciate any help with this anywould could give! Thanks in advance.





More information about the Python-list mailing list