bug
This commit is contained in:
parent
6184fde5a2
commit
305a1808bf
12
tailor.py
12
tailor.py
|
@ -6,12 +6,12 @@ u"""Afficher les lignes d'un fichier en mettant en surbrillance certains pattern
|
||||||
import sys, subprocess, re
|
import sys, subprocess, re
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
|
|
||||||
def fixnlf(line, mo): return re.sub(r'\\n', '\n', line)
|
def fixnlf(line, mo=None): return re.sub(r'\\n', '\n', line)
|
||||||
def bluef(line, mo): return '\x1B[34m%s\x1B[0m' % line
|
def bluef(line, mo=None): return '\x1B[34m%s\x1B[0m' % line
|
||||||
def greenf(line, mo): return '\x1B[32m%s\x1B[0m' % line
|
def greenf(line, mo=None): return '\x1B[32m%s\x1B[0m' % line
|
||||||
def yellowf(line, mo): return '\x1B[33m%s\x1B[0m' % line
|
def yellowf(line, mo=None): return '\x1B[33m%s\x1B[0m' % line
|
||||||
def redf(line, mo): return '\x1B[31m%s\x1B[0m' % line
|
def redf(line, mo=None): return '\x1B[31m%s\x1B[0m' % line
|
||||||
def nonef(line, mo): return re.sub('\x1B\[.*?m', '', line)
|
def nonef(line, mo=None): return re.sub('\x1B\[.*?m', '', line)
|
||||||
|
|
||||||
FORMATS = OrderedDict([
|
FORMATS = OrderedDict([
|
||||||
('fixnl', fixnlf),
|
('fixnl', fixnlf),
|
||||||
|
|
Loading…
Reference in New Issue