class_docstr: Run source code which modifies a Document
  
      
docstr: Args:
      source (str) : python source code
  
      filename (str) : a filename to use in any debugging or error output
  
      argv (list[str], optional) : a list of string arguments to make
          available as ``sys.argv`` when the code executes
docstr_tok: ["Args",":","source","(","str",")",":","python","source","code","filename","(","str",")",":","a","filename","to","use","in","any","debugging","or","error","output","argv","(","list","[","str","]",",","optional",")",":","a","list","of","string","arguments","to","make","available","as","``","sys.argv","``","when","the","code","executes"]
code: def __init__(
      self,
      *,
      source: str,
      filename: PathLike,
      argv: list[str] = [],
      package: ModuleType | None = None,
  ) -> None:
      """
  
      Args:
          source (str) : python source code
  
          filename (str) : a filename to use in any debugging or error output
  
          argv (list[str], optional) : a list of string arguments to make
              available as ``sys.argv`` when the code executes
  
      """
      super().__init__()
  
      self._runner = CodeRunner(source, filename, argv, package=package)
  
      self._loggers = {}
      for f in CodeHandler._io_functions:
          self._loggers[f] = self._make_io_logger(f)
  
imports: from __future__ import annotations
  import logging
  from contextlib import contextmanager
  from os.path import basename, splitext
  from types import ModuleType
  from typing import Any, Callable, ClassVar
  from ...core.types import PathLike
  from ...document import Document
  from ...io.doc import curdoc, patch_curdoc
  from .code_runner import CodeRunner
  from .handler import Handler
label_desc: Use image node_id 1 to create a new CodeHandler object from inherited base classes: Handler with example: obj = CodeHandler()