[Tkinter-discuss] to read from label

Fredrik Lundh fredrik at pythonware.com
Wed Sep 14 08:17:47 CEST 2005


Monu Agrawal wrote:

> Hi, I have a tkinter label written some text I have forgotten. Now I want to
> know that what is written in the label.
> How can I get text of the label?

    w = Label(text="forgotten text")

    text = w.cget("text")
    print text

</F>





More information about the Tkinter-discuss mailing list