This commit is contained in:
Jephté Clain 2018-06-19 09:06:49 +04:00
parent 6184fde5a2
commit 305a1808bf
1 changed files with 6 additions and 6 deletions

View File

@ -6,12 +6,12 @@ u"""Afficher les lignes d'un fichier en mettant en surbrillance certains pattern
import sys, subprocess, re
from collections import OrderedDict
def fixnlf(line, mo): return re.sub(r'\\n', '\n', line)
def bluef(line, mo): return '\x1B[34m%s\x1B[0m' % line
def greenf(line, mo): return '\x1B[32m%s\x1B[0m' % line
def yellowf(line, mo): return '\x1B[33m%s\x1B[0m' % line
def redf(line, mo): return '\x1B[31m%s\x1B[0m' % line
def nonef(line, mo): return re.sub('\x1B\[.*?m', '', line)
def fixnlf(line, mo=None): return re.sub(r'\\n', '\n', line)
def bluef(line, mo=None): return '\x1B[34m%s\x1B[0m' % line
def greenf(line, mo=None): return '\x1B[32m%s\x1B[0m' % line
def yellowf(line, mo=None): return '\x1B[33m%s\x1B[0m' % line
def redf(line, mo=None): return '\x1B[31m%s\x1B[0m' % line
def nonef(line, mo=None): return re.sub('\x1B\[.*?m', '', line)
FORMATS = OrderedDict([
('fixnl', fixnlf),