I have a python package named foo
, which i use in imports:
import foo.conf
from foo.core import Something
Now i need to rename the foo
module into something else, let's say bar
, so i want to do:
import bar.conf
from bar.core import Something
but i want to maintain backward compatibility with existing code, so the old (foo.
) imports should work as well and do the same as the bar.
imports.
How can this be accomplished in python 2.7?