def getinnerframes(tb, context=1):
 framelist = []
 while tb:
  framelist.append(((tb.tb_frame,) + getframeinfo(tb, context)))
  tb = tb.tb_next
 return framelist

def getinnerframes ( tb , context = 1 ) : framelist = [ ] while tb : framelist . append ( ( ( tb . tb_frame , ) + getframeinfo ( tb , context ) ) ) tb = tb . tb_next return framelist
get a list of records for a tracebacks frame and all lower frames .