[Tutor] help with .get in Tkinter
Mark Kels
mark.kels at gmail.com
Sun Feb 20 16:12:54 CET 2005
Hi all.
First, here is the code I have a problem with (I got same problem in
my project) :
from Tkinter import *
def go():
e.get()
print e
main=Tk()
e=Entry(main)
e.pack()
b=Button(main,text='OK',command=go()).pack()
main.mainloop()
For some reason the function is called before I click the button, and
I get .10037088 before I have done a thing.
How do I do it right ???
--
1. The day Microsoft makes something that doesn't suck is probably the
day they start making vacuum cleaners.
2. Unix is user friendly - it's just picky about it's friends.
3. Documentation is like sex: when it is good, it is very, very good.
And when it is bad, it is better than nothing. - Dick Brandon
More information about the Tutor
mailing list