def get_module_path(module_name):
    path = sys.path
    for name in module_name.split('.'):
        file_pointer, path, desc = imp.find_module(name, path)
        path = [path, ]
        if file_pointer is not None:
            file_pointer.close()

    return path[0]
Gets the module path without importing anything.
dataset/ETHPy150Open openstack/horizon/openstack_dashboard/management/commands/migrate_settings.py/get_module_path