> On 13 May 2021, at 02:09, Mike Miller <python-...@mgmiller.net> wrote:
> 
> 
>> On 2021-05-11 16:12, Guido van Rossum wrote:
>> On Tue, May 11, 2021 at 4:07 PM Gregory P. Smith <g...@krypto.org     
>> There's a difference between tracebacks dumped as plain text (utf-8) by
>>    traceback.print_exc() appearing on stderr or directed into log files and
>>    what can be displayed within a terminal.  It is highly unusual to emit
>>    terminal control characters into log files.
>> And yet it happens all the time. :-( Let's not risk that happening.
> 
> 
> os.isatty() is helpful in that situation, 

Most tools that support colour output allow you to customise the colours
and have a always-colour, never-colour, auto-colour option.

Isatty() is useful for the auto.

Barry

> 
> -Mike
> 
> _______________________________________________
> Python-Dev mailing list -- python-dev@python.org
> To unsubscribe send an email to python-dev-le...@python.org
> https://mail.python.org/mailman3/lists/python-dev.python.org/
> Message archived at 
> https://mail.python.org/archives/list/python-dev@python.org/message/QT2CTAPV7BVUHEUR6OY6DKWTNX6WM5MF/
> Code of Conduct: http://python.org/psf/codeofconduct/

_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/I5A6JSFVERDC6YG6CNHSJQTY4CDUTSY6/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to