(name, modules)
Searches for the method/attribute name in the modules list. Name is fully qualified

    :param name: string, the method/attribute being searched
    :param modules: the list of modules created by :func:`get_submodules_of`
    :return: method/attribute object or None
Searches for the method/attribute name in the modules list. Name is fully qualified
Searches for the method / attribute name in the modules list . Name is fully qualified
def get_method_attr(name, modules):
    """
    Searches for the method/attribute name in the modules list. Name is fully qualified

    :param name: string, the method/attribute being searched
    :param modules: the list of modules created by :func:`get_submodules_of`
    :return: method/attribute object or None
    """
    split_name = name.rsplit('.', 2)
    name = split_name[-1]
    class_name = split_name[-2]
    module_name = split_name[-3]

    the_module = next((e for e in modules if e['module_name'] == module_name), None)
    the_class = next((e for e in the_module['classes'] if e['class_name'] == class_name), None)
    try:
        return getattr(the_class['class_object'], name)
    except AttributeError:
        return None
def get_method_attr ( name , modules ) : split_name = name . rsplit ( '.' , 2 ) name = split_name [ - 1 ] class_name = split_name [ - 2 ] module_name = split_name [ - 3 ] the_module = next ( ( e for e in modules if e [ 'module_name' ] == module_name ) , None ) the_class = next ( ( e for e in the_module [ 'classes' ] if e [ 'class_name' ] == class_name ) , None ) try : return getattr ( the_class [ 'class_object' ] , name ) except AttributeError : return None