Withing a module I can assign a value to a global var by assigning to it in the outermost scope. Fine.
But how can I do this if the attribute name itself is kept in a variable. Once the module is loaded I can access the module's namespace no problem, but inside the module the dictionary is not yet present right ? IOW how can I write something like # xxx.py for varName in ("foo", "bar"): magic.varName = 1 so I can later refer to them as # yyy.py import xxx x = xxx.foo y = xxx.bar -- http://mail.python.org/mailman/listinfo/python-list