add a theme for python stack traces

This commit is contained in:
Johann Dreo 2013-10-10 22:18:36 +02:00
commit 50a77bb22e

20
colout/colout_python.py Normal file
View file

@ -0,0 +1,20 @@
def theme():
return [
# traceback header
["^Traceback .*$", "blue" ],
# File, line, in
[
"^\s{2}(File \")(/.*?/)*([^/:]+)(\", line) ([0-9]+)(, in) (.*)$",
"blue, none, white,blue, yellow,blue",
"normal,normal,bold, normal,normal,bold"
],
# ["^\s{2}File \"(.*)\", line ([0-9]+), in (.*)$", "white,yellow,white", "normal,normal,bold" ],
# Error name
["^([A-Za-z]*Error):*", "red", "bold" ],
["^([A-Za-z]*Exception):*", "red", "bold" ],
# any quoted things
["Error.*['\"](.*)['\"]", "magenta" ],
# python code
["^\s{4}.*$", "Python", "monokai" ],
]