traceback string

Jürgen Hermann jhe at webde-ag.de
Thu Jun 29 12:38:53 EDT 2000


"Arinté" <shouldbe at message.com> schrieb im Newsbeitrag
news:8jfnn5$1fpo$1 at news2atm.raleigh.ibm.com...
> How do you print the traceback string from an exception
> try:
>    whatever()
> except:
            import traceback, string
            msg = string.join(traceback.format_exception(
                    sys.exc_info()[0], sys.exc_info()[1],
sys.exc_info()[2]), "")
            print msg






More information about the Python-list mailing list