From 305a1808bf664ee6ed24518b0c30e85ebce0b3af Mon Sep 17 00:00:00 2001 From: Jephte Clain Date: Tue, 19 Jun 2018 09:06:49 +0400 Subject: [PATCH] bug --- tailor.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tailor.py b/tailor.py index 4378ed1..26d28cc 100755 --- a/tailor.py +++ b/tailor.py @@ -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),