truly global variables

ketulp_baroda at yahoo.com ketulp_baroda at yahoo.com
Thu Feb 19 03:47:13 EST 2004


Hi
Global variables are not truly global in Python ; they are only global
within a module namespace. I want a variable such that if i change its
value in any module then it should be reflected in other modules too.
What I mean is I wanta varibale say i whose initial value is 1.
If I change value of i in foo.py to say 5 and now I print value of i
in bar.py ,it should print 5.How to do this??

  
--



More information about the Python-list mailing list