def resolve_dotted_attribute(obj, attr, allow_dotted_names=True):

    if allow_dotted_names:
        attrs = attr.split('.')
    else:
        attrs = [attr]

    for i in attrs:
        if i.startswith('_'):
            raise AttributeError(
                'attempt to access private attribute "%s"' % i
                )
        else:
            obj = getattr(obj,i)
    return obj
Low-level unquote a message, adhering to the CTCP guidelines.
dataset/ETHPy150Open kleientertainment/ds_mod_tools/pkg/win32/Python27/Lib/SimpleXMLRPCServer.py/resolve_dotted_attribute--crossover with--dataset/ETHPy150Open ecdavis/pants/pants/contrib/irc.py/ctcpUnquote