code: def format_exception(thetype, ex, tb):
      
      if isinstance(tb, str):
          return tb
      return ''.join(traceback.format_exception(thetype, ex, tb))
docs: This function is a drop-in replacement for Python's
      traceback.format_exception().
  
      Since traceback objects can not be pickled, Exscript is forced to
      manipulate them before they are passed accross process boundaries.
      This leads to the fact the Python's traceback.format_exception()
      no longer works for those objects.
  
      This function works with any traceback object, regardless of whether
      or not Exscript manipulated it.