def truncate_attr_at_path( obj, path ):
    """
    Traverses a set of nested attributes and truncates the value on an object

    :param mixed obj: The object to set the attribute on
    :param tuple path: The path to the attribute on the object

    :rtype None:
    """
    target = obj
    last_attr = path[-1]
    message = []

    if type(last_attr) == tuple:
        last_attr = last_attr[-1]
    for attr in path[0:-1]:
        try:
            if type(attr) in ( str, unicode ) and target and hasattr( target, attr ) and hasattr( target, '__getitem__' ):
                target = getattr( target, attr )
            elif target:
                try: target = target[attr]
                except: target = eval( "target." + str( attr ) )
        except:
            pass
        try:
            if not target: return
        except: return
        if isinstance( target, ( tuple, list ) ): target = list(target) # Tuples are immutable. Need to be able to manipulate.

    try:
        del_statement = "del target." + str( last_attr )
        eval( del_statement )
        return
    except: pass

    if type( last_attr ) in ( str, unicode ) and target and hasattr( target, last_attr ):
        try: delattr( target, last_attr )
        except: message.append("Failed to delete attribute" + str(last_attr) + "on target" + str(target) )
    elif type(target) == list:
        try: target.pop(last_attr)
        except: message.append( "Failed to delete value on list" + str(target) + "at index" + str(last_attr) )
    else:
        try: del target[str(last_attr)]
        except: message.append( "failed to delete attribute on subscriptable object" )
Traverses a set of nested attributes and truncates the value on an object

    :param mixed obj: The object to set the attribute on
    :param tuple path: The path to the attribute on the object

    :rtype None: