[Tutor] Buttons automatically executing
phillip.hart at gmail.com
Wed Jun 15 21:31:55 CEST 2005
Thanks for taking the time to read this.
Excuse me if this falls under the boundaries of a "newbie" question, as I am
a self-taught programmer.
While using Tkinter to create buttons, something unexpected happens when the
button commands call functions. Namely, when I run the following, it
immediately executes the print statements without the button ever being
pressed. Additionally, pressing the button once the Tk window is up will not
activate the button.
from Tkinter import *
print "I am in row ",x," and column ",y
Lastly, when I change the command to be anything other than a function, such
as a print statement, it works fine. What am I doing wrong here?
thanks again for your time and help,
green python user (no pun intended),
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Tutor