global variables - how??

Remco Gerlich scarblac-spamtrap at pino.selwerd.nl
Wed Apr 12 13:52:30 EDT 2000


Anders Eggers-Krag wrote in comp.lang.python:
> how do I define a propper global variable that works in all functions in all
> modules?

You can't. A global variable can be accessed everywhere in its module, but
not in all modules. You can import the module with the variable and use it
that way in other modules though.


-- 
Remco Gerlich,  scarblac at pino.selwerd.nl
  Murphy's Rules, "Triple time! Triple time!":
   In Avalon Hill's Squad Leader, an infantryman carrying a flamethrower
   can run at 25 mph along a road, providing a sergeant or other leader
   is encouraging him.



More information about the Python-list mailing list