Donnal Walter wrote: > I would like to be able to write something like: > > import dcw as dw > import xyz as dw > > such that the 'dw' namespace includes definitions from both dcw and xyz, > but in the script above names from dcw1 are lost. How can I combine the > two? (I'd rather not use 'import *'.) Thanks.
This sounds really gross and dangerous, but you could do this, and it might even work. I wouldn't recommend it, but without knowing your use case I can't say what I'd recommend instead. import dcw as dw import xyz as _ dw.__dict__.update(_.__dict__) del _ -Peter -- http://mail.python.org/mailman/listinfo/python-list