combining namespaces when importing two modules

Donnal Walter donnal at donnal.net
Mon Aug 22 15:28:19 EDT 2005


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.

Best regards,
Donnal Walter
Arkansas Children's Hospital





More information about the Python-list mailing list