def setStackEnv(frame, name, value):
    """
    set the stackEnv variable of the given name to the given value
    in the given frame
    """
    frame.f_locals[_internalName(name)] = value
    delMarker = _internalDelMarker(name)
    if delMarker in frame.f_locals:
        del frame.f_locals[delMarker]

    set the stackEnv variable of the given name to the given value
    in the given frame
    
recipes/Python/578147_Stack_Environment/recipe-578147.py