colout/colout/colout_python.py
nojhan e499f40f7d Bring global context variables to the themes.
Encapsulate global variables in the `context` dictionary.
Pass the context through the called themes, that can thus change the configuration.
2014-04-25 13:50:51 +02:00

20 lines
782 B
Python

def theme(context):
return context,[
# 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" ],
]