class_docstr: Windows 10 output abstraction. This enables and uses vt100 escape sequences.
class_docstr_tok: ["Windows","10","output","abstraction",".","This","enables","and","uses","vt100","escape","sequences","."]
docstr: Write to output stream and flush.
docstr_tok: ["Write","to","output","stream","and","flush","."]
code: def flush(self) -> None:
      """
      Write to output stream and flush.
      """
      original_mode = DWORD(0)
  
      # Remember the previous console mode.
      windll.kernel32.GetConsoleMode(
          self._hconsole, byref(original_mode)
      )
  
      # Enable processing of vt100 sequences.
      windll.kernel32.SetConsoleMode(
          self._hconsole,
          DWORD(
              ENABLE_PROCESSED_INPUT
              | ENABLE_VIRTUAL_TERMINAL_PROCESSING
          ),
      )
  
      try:
          self.vt100_output.flush()
      finally:
          # Restore console mode.
          windll.kernel32.SetConsoleMode(self._hconsole, original_mode)
  
file_path: catboost/contrib/python/prompt-toolkit/py3/prompt_toolkit/output/windows10.py
imports: from __future__ import annotations
  import sys
  from ctypes import byref, windll
  from ctypes.wintypes import DWORD, HANDLE
  from typing import Any, TextIO
  from prompt_toolkit.data_structures import Size
  from prompt_toolkit.win32_types import STD_OUTPUT_HANDLE
  from .base import Output
  from .color_depth import ColorDepth
  from .vt100 import Vt100_Output
  from .win32 import Win32Output
label_desc: Use image node_id 2 for calling the Windows10_Output obj's underlying member method code with example usage: obj.flush() without return types