to read from label

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

to read from label

monuindia@gmail.com
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?

_______________________________________________
Tkinter-discuss mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/tkinter-discuss
Reply | Threaded
Open this post in threaded view
|

Re: to read from label

midtoad
Well I for one don't quite understand what you are asking. Can you explain again, maybe in more detail? How can you forget a label text?

Cheers
S

-----Original Message-----
    From: "Monu Agrawal"<[hidden email]>
    Sent: 05-09-13 23:20:17
    To: "[hidden email]"<[hidden email]>
    Subject: [Tkinter-discuss] to read from label
   
    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?

_______________________________________________
Tkinter-discuss mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/tkinter-discuss
Reply | Threaded
Open this post in threaded view
|

Re: to read from label

Fredrik Lundh
In reply to this post by monuindia@gmail.com
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>



_______________________________________________
Tkinter-discuss mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/tkinter-discuss