Electron microscopy
 
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:
         Automatically Review, Scroll, Click Webpage and Its Link
Output:         
         Automatically Review, Scroll, Click Webpage and Its Link

============================================

Global Access to the local variable with "global": Code:
         Automatically Review, Scroll, Click Webpage and Its Link
Output:         
         Automatically Review, Scroll, Click Webpage and Its Link

============================================

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:
         Automatically Review, Scroll, Click Webpage and Its Link
Output:         
         Automatically Review, Scroll, Click Webpage and Its Link

============================================

A problem and its solution: UnboundLocalError: local variable 'number' referenced before assignment. Code.
         Automatically Review, Scroll, Click Webpage and Its Link
     Solution: we either can use 'global' keyword or global() function: Code.     
         Automatically Review, Scroll, Click Webpage and Its Link
     Output:    
         Automatically Review, Scroll, Click Webpage and Its Link

============================================

.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
Output:         
          Turn on and off with mouse press

=====================================================

Turn on and off with mouse press: code:          
          Turn on and off with mouse press
Output:         
          Turn on and off with mouse press

=====================================================

Popup window with options: code:
         Pop-up windows
         Pop-up windows
Output:         
         Pop-up windows
         Pop-up windows
         Pop-up windows
         Pop-up windows
         Pop-up windows
         Pop-up windows

         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         

 

 

 

 

 

 

 

 

 

 

=================================================================================