Lines Matching refs:stream
269 def _has_colors(stream): argument
279 if stream in cached_has_colors:
280 return cached_has_colors[stream]
281 cached_has_colors[stream] = True
283 if not hasattr(stream, "isatty"):
284 cached_has_colors[stream] = False
286 if not stream.isatty():
288 cached_has_colors[stream] = False
293 cached_has_colors[stream] = curses.tigetnum("colors") > 2
297 cached_has_colors[stream] = False
298 return cached_has_colors[stream]