On 24 June 2013 21:12, John Gordon <gor...@panix.com> wrote: > Since you're new to programming, this might be a bit tricky to explain, > but I'll do my best. :-) > > The problem is that change() isn't being executed here; instead it's being > executed from within root.mainloop(), whenever the user presses button-1. > > And within root.mainloop(), there is no variable called isWhite.
Sorry, but I don't think you're right. Functions "carry" their contexts around with them, so that shouldn't matter (See Peter and Antoon's comments for explanation of what I think it is) -- http://mail.python.org/mailman/listinfo/python-list