On Aug 24, 9:43 pm, "Mohamed Yousef" <[EMAIL PROTECTED]> wrote: > but what about module-wide variables what is the approach to them , > will i have to store them in a memory table (SQL) , or keep passing > them between objects - which i really hate -
If you have a set of global variables that you want to share among modules, put them all into a module. config.py: var1 = 'a' a.py: import config config.var1 = 'z' b.py: import config print config.var1 >>> import a >>> import b z A module is only really imported once; each subsequent import is given a reference to that imported module, so any changes to the module values are shared amongst each importing module. -- http://mail.python.org/mailman/listinfo/python-list