def __init__(self, output_writer, tool_name):
    """Initializes a status view.

    Args:
      output_writer (OutputWriter): output writer.
      tool_name (str): namd of the tool.
    """
    super(StatusView, self).__init__()
    self._artifact_filters = None
    self._filter_file = None
    self._have_ansi_support = not win32console
    self._mode = self.MODE_WINDOW
    self._output_writer = output_writer
    self._source_path = None
    self._source_type = None
    self._stdout_output_writer = isinstance(
        output_writer, tools.StdoutOutputWriter)
    self._storage_file_path = None
    self._tool_name = tool_name

    if win32console:
      kernel32 = ctypes.windll.kernel32
      stdout_handle = kernel32.GetStdHandle(self._WINAPI_STD_OUTPUT_HANDLE)
      result = kernel32.SetConsoleMode(
          stdout_handle, self._WINAPI_ANSI_CONSOLE_MODE)
      self._have_ansi_support = result != 0
def __init__ ( self , output_writer , tool_name ) : super ( StatusView , self ) . __init__ ( ) self . _artifact_filters = None self . _filter_file = None self . _have_ansi_support = not win32console self . _mode = self . MODE_WINDOW self . _output_writer = output_writer self . _source_path = None self . _source_type = None self . _stdout_output_writer = isinstance ( output_writer , tools . StdoutOutputWriter ) self . _storage_file_path = None self . _tool_name = tool_name if win32console : kernel32 = ctypes . windll . kernel32 stdout_handle = kernel32 . GetStdHandle ( self . _WINAPI_STD_OUTPUT_HANDLE ) result = kernel32 . SetConsoleMode ( stdout_handle , self . _WINAPI_ANSI_CONSOLE_MODE ) self . _have_ansi_support = result != 0
Initializes a status view.

    Args:
      output_writer (OutputWriter): output writer.
      tool_name (str): namd of the tool.