def currentframe():
    """Return the frame object for the caller's stack frame."""
    try:
        raise 'catch me'
    except:
        return sys.exc_traceback.tb_frame.f_back #@UndefinedVariable
Return the frame object for the caller's stack frame.
debugger/src/_pydev_imps/_pydev_inspect.py