global variables - how??

William Park parkw at better.net
Wed Apr 12 13:41:15 EDT 2000


On Wed, Apr 12, 2000 at 07:28:37PM +0200, Anders Eggers-Krag wrote:
> how do I define a propper global variable that works in all functions in all
> modules?

As far as I know, you can't.  You have to use 'global ...' inside all
your functions.

--William

> 
> I have tried simply
> defining one outside of any function in the main module,
> I have tried using the global keyword under the same cicumstances,
> but they are not even avialible inside of functions within the main
> module...
> 
> 
> --
> Anders Eggers - Krag
> 
> 
> -- 
> http://www.python.org/mailman/listinfo/python-list




More information about the Python-list mailing list