@requires_segment_info
def frame_lister(pl, segment_info, full_stack=False, maxframes=3):
 if full_stack:
  initial_stack_length = 0
  frames = segment_info[u'pdb'].stack
 else:
  initial_stack_length = segment_info[u'initial_stack_length']
  frames = segment_info[u'pdb'].stack[initial_stack_length:]
 if (len(frames) > maxframes):
  frames = frames[(- maxframes):]
 return (({u'curframe': frame[0], u'initial_stack_length': initial_stack_length}, {}) for frame in frames)

@ requires_segment_info def frame_lister ( pl , segment_info , full_stack = False , maxframes = 3 ) : if full_stack : initial_stack_length = 0 frames = segment_info [ u'pdb' ] . stack else : initial_stack_length = segment_info [ u'initial_stack_length' ] frames = segment_info [ u'pdb' ] . stack [ initial_stack_length : ] if ( len ( frames ) > maxframes ) : frames = frames [ ( - maxframes ) : ] return ( ( { u'curframe' : frame [ 0 ] , u'initial_stack_length' : initial_stack_length } , { } ) for frame in frames )
list all frames in segment_info format .