code: def thread2list(frame):
      
      l = []
      while frame:
          l.insert(0, frame2string(frame))
          frame = frame.f_back
      return l
docs: Return list with string frame representation of each frame of 
      thread.