@@ -42,118 +42,128 @@ def exception_colors():
4242 ex_colors = ColorSchemeTable ()
4343
4444 # Populate it with color schemes
45- C = TermColors # shorthand and local lookup
46- ex_colors .add_scheme (ColorScheme (
47- 'NoColor' ,
48- # The color to be used for the top line
49- topline = C .NoColor ,
50-
51- # The colors to be used in the traceback
52- filename = C .NoColor ,
53- lineno = C .NoColor ,
54- name = C .NoColor ,
55- vName = C .NoColor ,
56- val = C .NoColor ,
57- em = C .NoColor ,
58-
59- # Emphasized colors for the last frame of the traceback
60- normalEm = C .NoColor ,
61- filenameEm = C .NoColor ,
62- linenoEm = C .NoColor ,
63- nameEm = C .NoColor ,
64- valEm = C .NoColor ,
65-
66- # Colors for printing the exception
67- excName = C .NoColor ,
68- line = C .NoColor ,
69- caret = C .NoColor ,
70- Normal = C .NoColor
71- ))
45+ C = TermColors # shorthand and local lookup
46+ ex_colors .add_scheme (
47+ ColorScheme (
48+ "NoColor" ,
49+ {
50+ # The color to be used for the top line
51+ "topline" : C .NoColor ,
52+
53+ # The colors to be used in the traceback
54+ "filename" : C .NoColor ,
55+ "lineno" : C .NoColor ,
56+ "name" : C .NoColor ,
57+ "vName" : C .NoColor ,
58+ "val" : C .NoColor ,
59+ "em" : C .NoColor ,
60+
61+ # Emphasized colors for the last frame of the traceback
62+ "normalEm" : C .NoColor ,
63+ "filenameEm" : C .NoColor ,
64+ "linenoEm" : C .NoColor ,
65+ "nameEm" : C .NoColor ,
66+ "valEm" : C .NoColor ,
67+
68+ # Colors for printing the exception
69+ "excName" : C .NoColor ,
70+ "line" : C .NoColor ,
71+ "caret" : C .NoColor ,
72+ "Normal" : C .NoColor ,
73+ },
74+ )
75+ )
7276
7377 # make some schemes as instances so we can copy them for modification easily
74- ex_colors .add_scheme (ColorScheme (
75- 'Linux' ,
76- # The color to be used for the top line
77- topline = C .LightRed ,
78-
79- # The colors to be used in the traceback
80- filename = C .Green ,
81- lineno = C .Green ,
82- name = C .Purple ,
83- vName = C .Cyan ,
84- val = C .Green ,
85- em = C .LightCyan ,
86-
87- # Emphasized colors for the last frame of the traceback
88- normalEm = C .LightCyan ,
89- filenameEm = C .LightGreen ,
90- linenoEm = C .LightGreen ,
91- nameEm = C .LightPurple ,
92- valEm = C .LightBlue ,
93-
94- # Colors for printing the exception
95- excName = C .LightRed ,
96- line = C .Yellow ,
97- caret = C .White ,
98- Normal = C .Normal
99- ))
78+ ex_colors .add_scheme (
79+ ColorScheme (
80+ "Linux" ,
81+ {
82+ # The color to be used for the top line
83+ "topline" : C .LightRed ,
84+ # The colors to be used in the traceback
85+ "filename" : C .Green ,
86+ "lineno" : C .Green ,
87+ "name" : C .Purple ,
88+ "vName" : C .Cyan ,
89+ "val" : C .Green ,
90+ "em" : C .LightCyan ,
91+ # Emphasized colors for the last frame of the traceback
92+ "normalEm" : C .LightCyan ,
93+ "filenameEm" : C .LightGreen ,
94+ "linenoEm" : C .LightGreen ,
95+ "nameEm" : C .LightPurple ,
96+ "valEm" : C .LightBlue ,
97+ # Colors for printing the exception
98+ "excName" : C .LightRed ,
99+ "line" : C .Yellow ,
100+ "caret" : C .White ,
101+ "Normal" : C .Normal ,
102+ },
103+ )
104+ )
100105
101106 # For light backgrounds, swap dark/light colors
102- ex_colors .add_scheme (ColorScheme (
103- 'LightBG' ,
104- # The color to be used for the top line
105- topline = C .Red ,
106-
107- # The colors to be used in the traceback
108- filename = C .LightGreen ,
109- lineno = C .LightGreen ,
110- name = C .LightPurple ,
111- vName = C .Cyan ,
112- val = C .LightGreen ,
113- em = C .Cyan ,
114-
115- # Emphasized colors for the last frame of the traceback
116- normalEm = C .Cyan ,
117- filenameEm = C .Green ,
118- linenoEm = C .Green ,
119- nameEm = C .Purple ,
120- valEm = C .Blue ,
121-
122- # Colors for printing the exception
123- excName = C .Red ,
124- #line = C.Brown, # brown often is displayed as yellow
125- line = C .Red ,
126- caret = C .Normal ,
127- Normal = C .Normal ,
128- ))
129-
130- ex_colors .add_scheme (ColorScheme (
131- 'Neutral' ,
132- # The color to be used for the top line
133- topline = C .Red ,
134-
135- # The colors to be used in the traceback
136- filename = C .LightGreen ,
137- lineno = C .LightGreen ,
138- name = C .LightPurple ,
139- vName = C .Cyan ,
140- val = C .LightGreen ,
141- em = C .Cyan ,
142-
143- # Emphasized colors for the last frame of the traceback
144- normalEm = C .Cyan ,
145- filenameEm = C .Green ,
146- linenoEm = C .Green ,
147- nameEm = C .Purple ,
148- valEm = C .Blue ,
149-
150- # Colors for printing the exception
151- excName = C .Red ,
152- #line = C.Brown, # brown often is displayed as yellow
153- line = C .Red ,
154- caret = C .Normal ,
155- Normal = C .Normal ,
156- ))
107+ ex_colors .add_scheme (
108+ ColorScheme (
109+ "LightBG" ,
110+ {
111+ # The color to be used for the top line
112+ "topline" : C .Red ,
113+
114+ # The colors to be used in the traceback
115+ "filename" : C .LightGreen ,
116+ "lineno" : C .LightGreen ,
117+ "name" : C .LightPurple ,
118+ "vName" : C .Cyan ,
119+ "val" : C .LightGreen ,
120+ "em" : C .Cyan ,
121+
122+ # Emphasized colors for the last frame of the traceback
123+ "normalEm" : C .Cyan ,
124+ "filenameEm" : C .Green ,
125+ "linenoEm" : C .Green ,
126+ "nameEm" : C .Purple ,
127+ "valEm" : C .Blue ,
128+
129+ # Colors for printing the exception
130+ "excName" : C .Red ,
131+ # "line": C.Brown, # brown often is displayed as yellow
132+ "line" : C .Red ,
133+ "caret" : C .Normal ,
134+ "Normal" : C .Normal ,
135+ },
136+ )
137+ )
138+
139+ ex_colors .add_scheme (
140+ ColorScheme (
141+ "Neutral" ,
142+ {
143+ # The color to be used for the top line
144+ "topline" : C .Red ,
145+ # The colors to be used in the traceback
146+ "filename" : C .LightGreen ,
147+ "lineno" : C .LightGreen ,
148+ "name" : C .LightPurple ,
149+ "vName" : C .Cyan ,
150+ "val" : C .LightGreen ,
151+ "em" : C .Cyan ,
152+ # Emphasized colors for the last frame of the traceback
153+ "normalEm" : C .Cyan ,
154+ "filenameEm" : C .Green ,
155+ "linenoEm" : C .Green ,
156+ "nameEm" : C .Purple ,
157+ "valEm" : C .Blue ,
158+ # Colors for printing the exception
159+ "excName" : C .Red ,
160+ # line = C.Brown, # brown often is displayed as yellow
161+ "line" : C .Red ,
162+ "caret" : C .Normal ,
163+ "Normal" : C .Normal ,
164+ },
165+ )
166+ )
157167
158168 # Hack: the 'neutral' colours are not very visible on a dark background on
159169 # Windows. Since Windows command prompts have a dark background by default, and
0 commit comments