How do you get the value you entered using the Entry widget in Tkinter?

Godson Gera godson.g at gmail.com
Wed Jul 13 12:07:15 EDT 2011


On Wed, Jul 13, 2011 at 1:31 PM, Benji Benjokal <benjokal at gmail.com> wrote:

> What is the simplist way to get the value you entered from the Entry widget
> in  Tkinter?
>

 Have you tried the get method of Entry widget ?

Here is a crude example

from Tkinter import*
r = Tk()
e = Entry(r)
e.pack()
def printData():
     print e.get()
b = Button(r,text='getdata',command=printData)
b.pack()
r.mainloop()






-- 
Thanks & Regards,
Godson Gera
Python Consultant India <http://godson.in/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20110713/47a44aed/attachment-0001.html>


More information about the Python-list mailing list