original_docstring: Return if current terminal supports color or not.
docstring: Return if current terminal supports color or not.
docstring_tokens: Return if current terminal supports color or not .
code: def supports_color(self):
          """Return if current terminal supports color or not."""
          plat = sys.platform
          supported_platform = plat != 'Pocket PC' and (plat != 'win32' or
                                                        'ANSICON' in os.environ)
          # isatty is not always implemented, #6223.
          is_a_tty = hasattr(sys.stdout, 'isatty') and sys.stdout.isatty()
          if not supported_platform or not is_a_tty:
              return False
          return True
code_tokens: def supports_color ( self ) : plat = sys . platform supported_platform = plat != 'Pocket PC' and ( plat != 'win32' or 'ANSICON' in os . environ ) is_a_tty = hasattr ( sys . stdout , 'isatty' ) and sys . stdout . isatty ( ) if not supported_platform or not is_a_tty : return False return True
short_docstring: Return if current terminal supports color or not.
short_docstring_tokens: Return if current terminal supports color or not .
comment: """Return if current terminal supports color or not."""$SEP$# isatty is not always implemented, #6223.