for k in sys.modules:
    if re.match('foo(\\.|$)', k):
        newk = k.replace('foo', 'foo1', 1)
sys.modules[newk] = sys.modules[k]
del sys.modules[k]
sys.path.insert(0, './python')
Is it possible to use two Python packages with the same name?