def prettify_exception(ex):
    print """
===================================
Exception: (%s) %s
%s
===================================
""" % (ex.__class__.__name__, ex.message, traceback.format_exc())
Outputs the exception with its stack trace within separator lines.
dataset/ETHPy150Open brunobraga/termsaver/termsaverlib/common.py/prettify_exception