Global variables in modules/functions

Aaron Deskins ndeskins at ecn.purdue.edu
Mon Nov 22 16:01:45 CET 2004


Thanks! That works great.

Scott David Daniels wrote:

> 
> The easiest way to do this is to create a module named "globals", and
> have any modules wanting to work like:
> 
> import globals
> ...
> def change_n():
>     globals.n = 2
> 



More information about the Python-list mailing list