(obj_name)
return split_obj
Retrieves object corresponding to fully qualified name obj_name.

    The fully qualified name starts with the imported module name visible by sys.modules followed by
    submodules and then classes and finally by class attributes
    :param obj_name: Fully qualified object name string
    :return: If found, returns the object corresponding to obj_name. Otherwise raises exception
    :raises AttributeError: If submodule or attribute does not exists
Retrieves object corresponding to fully qualified name obj_name.
Retrieves object corresponding to fully qualified name obj_name .
def get_obj(obj_name):
    """
    Retrieves object corresponding to fully qualified name obj_name.

    The fully qualified name starts with the imported module name visible by sys.modules followed by
    submodules and then classes and finally by class attributes
    :param obj_name: Fully qualified object name string
    :return: If found, returns the object corresponding to obj_name. Otherwise raises exception
    :raises AttributeError: If submodule or attribute does not exists
    """
    split_name = obj_name.split('.')
    split_obj = sys.modules[split_name[0]]

    # Iterate through submodules
    while ismodule(split_obj) and len(split_name) > 1:
        split_name.pop(0)
        not_found = True
        for (name, obj) in getmembers(split_obj):  # Go through members of split_obj
            if split_name[0] == name:
                not_found = False
                break

        if not_found:
            raise AttributeError('Member `' + split_name[0] + '` for `' + obj_name + '` does not exists')

        split_obj = obj

    split_name.pop(0)
    for name in split_name:
        split_obj = getattr(split_obj, name, 0)

    return split_obj
def get_obj ( obj_name ) : split_name = obj_name . split ( '.' ) split_obj = sys . modules [ split_name [ 0 ] ] # Iterate through submodules while ismodule ( split_obj ) and len ( split_name ) > 1 : split_name . pop ( 0 ) not_found = True for ( name , obj ) in getmembers ( split_obj ) : # Go through members of split_obj if split_name [ 0 ] == name : not_found = False break if not_found : raise AttributeError ( 'Member `' + split_name [ 0 ] + '` for `' + obj_name + '` does not exists' ) split_obj = obj split_name . pop ( 0 ) for name in split_name : split_obj = getattr ( split_obj , name , 0 ) return split_obj