Movatterモバイル変換


[0]ホーム

URL:


Changing global variables in tkinter/pmw callback

Brian Elmegaardbe at mek.dtu.dk
Thu Apr 5 06:53:38 EDT 2001


Thanks a lot, Fredrik.I now learned how to do it.I use a list instead of a "variable" for the CurrentCanvasSetting. Thisallows me to use it as a global variable, and I can get the wantedbehavior. Still, I don't really understand the reasons. I have tried to look inthe tutorial, the lib-ref and the lang-ref. However, for anon-CS-engineer it's too hard to get a meaningful explanation. Can it bewritten in a few words, so I may understand why lists are (and have tobe) so different from "normal" variables?Fredrik Lundh wrote:>> has nothing to do with scopes -- objects and assignments don't work> as you and your code expects.Don't blame the code.>> I'll leave it to alex to write the long, pedagogical explanation.Looking forward to it.-- Brianhttp://www.et.dtu.dk/energysystemshttp://www.rk-speed.dkhttp://fiduso.dkhttp://sunsite.auc.dk/dk-tug\TeX, tak


More information about the Python-listmailing list

[8]ページ先頭

©2009-2025 Movatter.jp