Answers for "print python traceback"

1

print traceback python

import traceback
import sys

try:
    do_stuff()
except Exception:
    print(traceback.format_exc())
    # or
    print(sys.exc_info()[2])
Posted by: Guest on October-08-2021

Code answers related to "print python traceback"

Python Answers by Framework

Browse Popular Code Answers by Language