On 03/08/2014 07:34 AM, Dan Muresan wrote:
>> We use "'TERM' in os.environ" to decide if you use color or not.
>> We could also add a new command line option to force disabling colors.
> Hi Yann, you should probably use sys.stderr.isatty() (or more
> generally os.isatty (file.fileno())). It's the only way to determine
> whether a specific file descriptor is linked to a terminal. Besides
> the common use-case of running programs from bash with stderr
> redirected to a file, it's also possible to run a non-interactive
> program with a pseudotty (e.g. via expect). So $TERM isn't really
> Having said that, for users of less that need to view log files with
> ANSI color sequences, there is the -R flag, which I had forgotten
> about when posting initially :)
done in hg.
Gajim-devel mailing list