'Python importer load hook.
Tries to load the module; raises an ImportError if it can\'t.'

def load_module(self, fullname):

    if (fullname in sys.modules):
        return sys.modules[fullname]
    (namespace, dot, module_name) = fullname.rpartition('.')
    if self.is_prefix(fullname):
        module = SpackNamespace(fullname)
    elif (namespace == self.full_namespace):
        real_name = self.real_name(module_name)
        if (not real_name):
            raise ImportError(('No    module    %s    in    %s' % (module_name, self)))
        module = self._get_pkg_module(real_name)
    else:
        raise ImportError(('No    module    %s    in    %s' % (fullname, self)))
    module.__loader__ = self
    sys.modules[fullname] = module
    if (namespace != fullname):
        parent = sys.modules[namespace]
        if (not hasattr(parent, module_name)):
            setattr(parent, module_name, module)
    return module
