class_docstr: :param get_size: A callable which returns the `Size` of the output terminal.
  :param stdout: Any object with has a `write` and `flush` method + an 'encoding' property.
  :param true_color: Use 24bit color instead of 256 colors. (Can be a :class:`SimpleFilter`.)
      When `ansi_colors_only` is set, only 16 colors are used.
  :param ansi_colors_only: Restrict to 16 ANSI colors only.
  :param term: The terminal environment variable. (xterm, xterm-256color, linux, ...)
  :param write_binary: Encode the output before writing it. If `True` (the
      default), the `stdout` object is supposed to expose an `encoding` attribute.
code: def __init__(
      self,
      stdout,
      get_size,
      true_color=False,
      ansi_colors_only=None,
      term=None,
      write_binary=True,
  ):
      assert callable(get_size)
      assert term is None or isinstance(term, six.text_type)
      assert all(hasattr(stdout, a) for a in ("write", "flush"))
  
      if write_binary:
          assert hasattr(stdout, "encoding")
  
      self._buffer = []
      self.stdout = stdout
      self.write_binary = write_binary
      self.get_size = get_size
      self.true_color = to_simple_filter(true_color)
      self.term = term or "xterm"
  
      # ANSI colors only?
      if ansi_colors_only is None:
          # When not given, use the following default.
          ANSI_COLORS_ONLY = bool(
              os.environ.get("PROMPT_TOOLKIT_ANSI_COLORS_ONLY", False)
          )
  
          @Condition
          def ansi_colors_only():
              return ANSI_COLORS_ONLY or term in (
                  "linux",
                  "eterm-color",
              )
  
      else:
          ansi_colors_only = to_simple_filter(ansi_colors_only)
  
      self.ansi_colors_only = ansi_colors_only
  
      # Cache for escape codes.
      self._escape_code_cache = _EscapeCodeCache(
          ansi_colors_only=ansi_colors_only
      )
      self._escape_code_cache_true_color = _EscapeCodeCache(
          true_color=True, ansi_colors_only=ansi_colors_only
      )
  
imports: from __future__ import unicode_literals
  from prompt_toolkit.filters import to_simple_filter, Condition
  from prompt_toolkit.layout.screen import Size
  from prompt_toolkit.renderer import Output
  from prompt_toolkit.styles import ANSI_COLOR_NAMES
  from six.moves import range
  import array
  import errno
  import os
  import six
label_desc: Use image node_id 1 to create a new Vt100_Output object from inherited base classes: Output with example: obj = Vt100_Output(stdout, get_size, true_color, ansi_colors_only, term, write_binary)