Changing global variables in tkinter/pmw callback

Fredrik Lundh fredrik at pythonware.com
Thu Apr 5 04:07:03 EDT 2001


Brian Elmegaard wrote:

> I think I am running into a problem with scope, but I am not sure.

has nothing to do with scopes -- objects and assignments don't work
as you and your code expects.

short answer: first read:

    http://effbot.org/guides/python-objects.htm

and then think about what the "setting=CurrentCanvasSetting" and
"setting=button.cget()" lines really do.

I'll leave it to alex to write the long, pedagogical explanation.

Cheers /F





More information about the Python-list mailing list