'Get a python module by its given fully-qualified name.
@param modname: The fully-qualified Python module name to load.
@type modname: C{str}
@return: an object representing the module identified by C{modname}
@rtype: L{PythonModule}
@raise KeyError: if the module name is not a valid module name, or no
such module can be identified as loadable.'

def __getitem__(self, modname):

    moduleObject = self.moduleDict.get(modname)
    if (moduleObject is not None):
        pe = PathEntry(self._smartPath(self._findEntryPathString(moduleObject)), self)
        mp = self._smartPath(moduleObject.__file__)
        return PythonModule(modname, mp, pe)
    if ('.' in modname):
        pkg = self
        for name in modname.split('.'):
            pkg = pkg[name]
        return pkg
    for module in self.iterModules():
        if (module.name == modname):
            return module
    raise KeyError(modname)
