Re: How can I print a traceback without raising an exception?

2011-02-13 Thread Chris Rebert
On Sun, Feb 13, 2011 at 10:05 AM, Gerald Britton wrote: > In the following example, I raise an exception in function h() which > prints a traceback.  I would like to know how I can get a similar > display on my terminal without raising an exception.  That is, can I > replace "raise Exception" in f

How can I print a traceback without raising an exception?

2011-02-13 Thread Gerald Britton
In the following example, I raise an exception in function h() which prints a traceback. I would like to know how I can get a similar display on my terminal without raising an exception. That is, can I replace "raise Exception" in function h() with some sequence of instructions (possibly using th