Peter Hansen wrote: > In general I would say that mucking with globals() like this is > probably best restricted to constants like in this case, if at all.
Modifying globals() not even necessary for this. When I want to dynamically update the global namespace, I do it this way: mod = __import__(__name__) setattr(mod,symbol,value) Works perfectly unless you're worried about someone modifying the built in __import__. -- CARL BANKS -- http://mail.python.org/mailman/listinfo/python-list