def _limited_traceback(excinfo):
 tb = extract_tb(excinfo.tb)
 try:
  idx = [(__file__ in e) for e in tb].index(True)
  return format_list(tb[(idx + 1):])
 except ValueError:
  return format_list(tb)

def _limited_traceback ( excinfo ) : tb = extract_tb ( excinfo . tb ) try : idx = [ ( __file__ in e ) for e in tb ] . index ( True ) return format_list ( tb [ ( idx + 1 ) : ] ) except ValueError : return format_list ( tb )
return a formatted traceback with all the stack from this frame up removed .