def post_mortem(tb): ip = ipapi.get() def_colors = ip.options.colors p = Pdb(def_colors) p.reset() while tb.tb_next is not None: tb = tb.tb_next p.interaction(tb.tb_frame, tb)