# Python 3.3+ has a std
# lib module for displaying
# tracebacks even when Python
# "dies", e.g with a segfault:
import faulthandler
faulthandler.enable()
# Can also be enabled with
# "python -X faulthandler"
# from the command line.
Learn more here:
faulthandler
— Dump the Python traceback