Python Print Exception Message Message и Stack Trace
# Basic syntax:
import traceback
try:
your code here
except:
print(traceback.format_exc())
Charles-Alexandre Roy
# Basic syntax:
import traceback
try:
your code here
except:
print(traceback.format_exc())