global for function - Integrated Circuits - - An Online Book - |
||||||||
Integrated Circuits http://www.globalsino.com/ICs/ | ||||||||
Chapter/Index: Introduction | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | Appendix | ||||||||
================================================================================= ============================================ Global Access to the local variable with "global": Code: ============================================ Global Access to the local variable with "global": Code: ============================================ Global Access to the local variable in a dictionary with globals(). Note that globals() returns a dictionary of elements in current module and we can use it to access / modify the global variable without using 'global' keyword: Code: ============================================ A problem and its solution: UnboundLocalError: local variable 'number' referenced before assignment. Code. ============================================ .bind(), side=, highlightbackground=, highlightthickness=, StringVar(), .set(), textvariable=, global, relief='flat', quit, .destroy(), background=, foreground=, .mainloop(), '<Return>', '<q>': code: ===================================================== Turn on and off with mouse press: code: ===================================================== Popup window with options: code:
|
||||||||
================================================================================= | ||||||||
|
||||||||