How to get a complete exception stack trace in Python
问题 The following snippet: import traceback def a(): b() def b(): try: c() except: traceback.print_exc() def c(): assert False a() Produces this output: Traceback (most recent call last): File "test.py", line 8, in b c() File "test.py", line 13, in c assert False AssertionError What should I use if I want the complete stack trace including the call to a? If it matters I have Python 2.6.6 edit: What I'd like to get is the same information I'd get if I left the try except out and let the exception