def _extract_traceback ( start ) : tb = sys . exc_info ( ) [ 2 ] for i in range ( start ) : tb = tb . tb_next return _parse_traceback ( tb )
python get stacktrace from sys
SNAGGED FROM traceback . py
def _extract_traceback(start):
    """
    SNAGGED FROM traceback.py

    RETURN list OF dicts DESCRIBING THE STACK TRACE
    """
    tb = sys.exc_info()[2]
    for i in range(start):
        tb = tb.tb_next
    return _parse_traceback(tb)