On 04/07/16 22:24, Josh Triplett wrote:
Rather than requiring an explicit option, how about detecting
whether stdout is a TTY and automatically suppressing color?
You could check "os.isatty(1)" in main(), and set a global "color =
False".  That would automatically handle the cases of redirecting to a
file or piping to another script, without requiring the user to pass
--no-color.

That's a good point - I'll submit a v2 with that.

--
Andrew Donnellan              OzLabs, ADL Canberra
andrew.donnel...@au1.ibm.com  IBM Australia Limited

Reply via email to