Better color support check.
Not all systems have `isatty` attribute on `sys.stdout` so check for existance of attribute before checking value. Also don't use color in Windows unless environ indicates support. Apparently, Windows can indicate support by either the presence of `ANSICON` environ variable or if the `TERM` environ variable is set to `ANSI`. Fixes #79. No additional tests added, as the relevant tests use fcntl, which is a Unix only lib. In fact, the tests won't even run in Windows.pull/83/head
parent
d422274563
commit
e43768f203
Loading…
Reference in New Issue