class_docstr: A hook to replace sys.excepthook that shows tracebacks in HTML.
code: def __init__(
      self, display=1, logdir=None, context=5, file=None, format="html"
  ):
      self.display = display  # send tracebacks to browser if true
      self.logdir = logdir  # log tracebacks to files if not None
      self.context = context  # number of source code lines per frame
      self.file = file or sys.stdout  # place to send the output
      self.format = format
  
imports: import inspect
  import keyword
  import linecache
  import os
  import pydoc
  import sys
  import tempfile
  import time
  import tokenize
  import traceback
  import warnings
  from html import escape
label_desc: Use image node_id 1 to create a new Hook object  with example: obj = Hook(display, logdir, context, file, format)