add a theme for python stack traces
This commit is contained in:
parent
2616166f76
commit
50a77bb22e
1 changed files with 20 additions and 0 deletions
20
colout/colout_python.py
Normal file
20
colout/colout_python.py
Normal 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" ],
|
||||
]
|
||||
Loading…
Add table
Add a link
Reference in a new issue