class_docstr: I/O abstraction for rendering to Windows consoles.
  (cmd.exe and similar.)
class_docstr_tok: ["I\/O","abstraction","for","rendering","to","Windows","consoles",".","(","cmd.exe","and","similar",".",")"]
docstr: Flush and call win API function.
docstr_tok: ["Flush","and","call","win","API","function","."]
code: def _winapi(self, func, *a, **kw):
      """
      Flush and call win API function.
      """
      self.flush()
  
      if _DEBUG_RENDER_OUTPUT:
          self.LOG.write(("%r" % func.__name__).encode("utf-8") + b"\n")
          self.LOG.write(
              b"     "
              + ", ".join(["%r" % i for i in a]).encode("utf-8")
              + b"\n"
          )
          self.LOG.write(
              b"     "
              + ", ".join(["%r" % type(i) for i in a]).encode("utf-8")
              + b"\n"
          )
          self.LOG.flush()
  
      try:
          return func(*a, **kw)
      except ArgumentError as e:
          if _DEBUG_RENDER_OUTPUT:
              self.LOG.write(
                  (
                      "    Error in %r %r %s\n" % (func.__name__, e, e)
                  ).encode("utf-8")
              )
  
imports: from __future__ import unicode_literals
  from ctypes import windll, byref, ArgumentError, c_char, c_long, c_ulong, c_uint, pointer
  from ctypes.wintypes import DWORD, HANDLE
  from prompt_toolkit.renderer import Output
  from prompt_toolkit.styles import ANSI_COLOR_NAMES
  from prompt_toolkit.win32_types import CONSOLE_SCREEN_BUFFER_INFO, STD_OUTPUT_HANDLE, STD_INPUT_HANDLE, COORD, SMALL_RECT
  import os
  import six
label_desc: Use image node_id 7 for calling the Win32Output obj's underlying member method code with example usage: obj._winapi(func) and returns: func