Import aliases for moving a module?

zopyxfilter at googlemail.com zopyxfilter at googlemail.com
Thu Mar 26 14:23:50 EDT 2009


For a while a maintained a Python package  'foo' with a number of
modules (including a nested structure of module). Now the package
moved into a namespace package
'a.b.foo'. What is the way to approach making old code work with the
new package in order
that imports like

 import foo.bar.xxx
 or
 from foo.bar import xxx

remain working for existing code.

-a



More information about the Python-list mailing list