I want to create a traceback like the one returned by sys.exc_info()[2]. I don't want a list of lines, I want an actual traceback object:
<traceback object at 0x7f6575c37e48>
How can I do this? My goal is to have it include the current stack minus one frame, so it looks the the caller is the most recent call.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…