Karim Belabas on Sat, 11 Jun 2016 17:37:00 +0200 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: annoying symbols in logfiles |
* Joerg Arndt [2016-06-11 17:08]: > I suggest to use isatty() in the pari code to detect whether the > output is actually a terminal. > If not a terminal, then the escape sequences should be dropped. This > is the behavior of many programs offering colorized output, e.g., > non-ancient versions of grep. (We do use isatty() to check whether the session is interactive.) But in fact, this occurs in a section of code where we already know that we are outputting to a logfile and not to a terminal. The current behavior (from 2.7.0 on) when logging (log != 0) is to leave control to the user: drop escape sequences from the logfile if log = 1, emit them if log = 2, and write LaTeX output if log = 3. See ??default(log). Cheers, K.B. -- Karim Belabas, IMB (UMR 5251) Tel: (+33) (0)5 40 00 26 17 Universite de Bordeaux Fax: (+33) (0)5 40 00 69 50 351, cours de la Liberation http://www.math.u-bordeaux.fr/~kbelabas/ F-33405 Talence (France) http://pari.math.u-bordeaux.fr/ [PARI/GP] `