class_docstr: Console attribute and special drawing characters and functions accessor.
  
  Use GetConsoleAttr() to get a global ConsoleAttr object shared by all callers.
  Use ConsoleAttr() for abstracting multiple consoles.
  
  If _out is not associated with a console, or if the console properties cannot
  be determined, the default behavior is ASCII art with no attributes.
  
  Attributes:
    _ANSI_COLOR: The ANSI color control sequence dict.
    _ANSI_COLOR_RESET: The ANSI color reset control sequence string.
    _csi: The ANSI Control Sequence indicator string, '' if not supported.
    _encoding: The character encoding.
        ascii: ASCII art. This is the default.
        utf8: UTF-8 unicode.
        win: Windows code page 437.
    _font_bold: The ANSI bold font embellishment code string.
    _font_italic: The ANSI italic font embellishment code string.
    _get_raw_key: A function that reads one keypress from stdin with no echo.
    _out: The console output file stream.
    _term: TERM environment variable value.
    _term_size: The terminal (x, y) dimensions in characters.
class_docstr_tok: ["Console","attribute","and","special","drawing","characters","and","functions","accessor",".","Use","GetConsoleAttr","(",")","to","get","a","global","ConsoleAttr","object","shared","by","all","callers",".","Use","ConsoleAttr","(",")","for","abstracting","multiple","consoles",".","If","_out","is","not","associated","with","a","console",",","or","if","the","console","properties","can","not","be","determined",",","the","default","behavior","is","ASCII","art","with","no","attributes",".","Attributes",":","_ANSI_COLOR",":","The","ANSI","color","control","sequence","dict",".","_ANSI_COLOR_RESET",":","The","ANSI","color","reset","control","sequence","string",".","_csi",":","The","ANSI","Control","Sequence","indicator","string",",","``","if","not","supported",".","_encoding",":","The","character","encoding",".","ascii",":","ASCII","art",".","This","is","the","default",".","utf8",":","UTF-8","unicode",".","win",":","Windows","code","page","437",".","_font_bold",":","The","ANSI","bold","font","embellishment","code","string",".","_font_italic",":","The","ANSI","italic","font","embellishment","code","string",".","_get_raw_key",":","A","function","that","reads","one","keypress","from","stdin","with","no","echo",".","_out",":","The","console","output","file","stream",".","_term",":","TERM","environment","variable","value",".","_term_size",":","The","terminal","(","x",",","y",")","dimensions","in","characters","."]
docstr: Constructor.
  
  Args:
    encoding: Encoding override.
      ascii -- ASCII art. This is the default.
      utf8 -- UTF-8 unicode.
      win -- Windows code page 437.
    suppress_output: True to create a ConsoleAttr that doesn't want to output
      anything.
docstr_tok: ["Constructor",".","Args",":","encoding",":","Encoding","override",".","ascii","--","ASCII","art",".","This","is","the","default",".","utf8","--","UTF-8","unicode",".","win","--","Windows","code","page","437.","suppress_output",":","True","to","create","a","ConsoleAttr","that","does","n't","want","to","output","anything","."]
code: def __init__(self, encoding=None, suppress_output=False):
      """Constructor.
  
      Args:
        encoding: Encoding override.
          ascii -- ASCII art. This is the default.
          utf8 -- UTF-8 unicode.
          win -- Windows code page 437.
        suppress_output: True to create a ConsoleAttr that doesn't want to output
          anything.
      """
      # Normalize the encoding name.
      if not encoding:
          encoding = self._GetConsoleEncoding()
      elif encoding == "win":
          encoding = "cp437"
      self._encoding = encoding or "ascii"
      self._term = (
          "" if suppress_output else os.getenv("TERM", "").lower()
      )
  
      # ANSI "standard" attributes.
      if self.SupportsAnsi():
          # Select Graphic Rendition parameters from
          # http://en.wikipedia.org/wiki/ANSI_escape_code#graphics
          # Italic '3' would be nice here but its not widely supported.
          self._csi = "\x1b["
          self._font_bold = "1"
          self._font_italic = "4"
      else:
          self._csi = None
          self._font_bold = ""
          self._font_italic = ""
  
      # Encoded character attributes.
      is_screen_reader = False
      if self._encoding == "utf8" and not is_screen_reader:
          self._box_line_characters = BoxLineCharactersUnicode()
          self._bullets = self._BULLETS_UNICODE
          self._progress_tracker_symbols = (
              ProgressTrackerSymbolsUnicode()
          )
      elif self._encoding == "cp437" and not is_screen_reader:
          self._box_line_characters = BoxLineCharactersUnicode()
          self._bullets = self._BULLETS_WINDOWS
          # Windows does not support the unicode characters used for the spinner.
          self._progress_tracker_symbols = ProgressTrackerSymbolsAscii()
      else:
          self._box_line_characters = BoxLineCharactersAscii()
          if is_screen_reader:
              self._box_line_characters = (
                  BoxLineCharactersScreenReader()
              )
          self._bullets = self._BULLETS_ASCII
          self._progress_tracker_symbols = ProgressTrackerSymbolsAscii()
  
      # OS specific attributes.
      self._get_raw_key = [console_attr_os.GetRawKeyFunction()]
      self._term_size = (
          (0, 0) if suppress_output else console_attr_os.GetTermSize()
      )
  
      self._display_width_cache = {}
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import unicode_literals
  import os
  import sys
  import unicodedata
  from fire.console import console_attr_os
  from fire.console import encoding
  from fire.console import text
  import six
label_desc: Use image node_id 1 to create a new ConsoleAttr object from inherited base classes: object with example: obj = ConsoleAttr(encoding, suppress_output)