def excepthook(self, except_type, exception, traceback):
if except_type is DeepReferenceError:<EOL><INDENT>print(exception.msg)<EOL><DEDENT>else:<EOL><INDENT>self.default_excepthook(except_type, exception, traceback)<EOL><DEDENT>
Not Used: Custom exception hook to replace sys.excepthook

    This is for CPython's default shell. IPython does not use sys.exepthook.

    https://stackoverflow.com/questions/27674602/hide-traceback-unless-a-debug-flag-is-set