lkml.org 
[lkml]   [2016]   [Jul]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: checkkconfigsymbols.py: add --no-color option
From
Date
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.donnellan@au1.ibm.com IBM Australia Limited

\
 
 \ /
  Last update: 2016-07-05 10:01    [W:0.096 / U:1.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site