def importName(modulename, name):
    """ Import a named object from a module in the context of this function,
        which means you should use fully qualified module paths.

        Return None on failure.
    """
    try:
        module = __import__(modulename, globals(), locals(), [name])
    except ImportError:
        return None
        
    return vars(module)[name]
 Import a named object from a module in the context of this function,
        which means you should use fully qualified module paths.

        Return None on failure.
    
recipes/Python/52241_Importing_name_module_computed/recipe-52241.py