Show More
@@ -58,28 +58,7 b' _builtin_meth_type = type(str.upper) # Bound methods have the same type as buil' | |||||
58 |
|
58 | |||
59 | Colors = TermColors # just a shorthand |
|
59 | Colors = TermColors # just a shorthand | |
60 |
|
60 | |||
61 | # Build a few color schemes |
|
61 | InspectColors = PyColorize.ANSICodeColors | |
62 | NoColor = ColorScheme( |
|
|||
63 | 'NoColor',{ |
|
|||
64 | 'header' : Colors.NoColor, |
|
|||
65 | 'normal' : Colors.NoColor # color off (usu. Colors.Normal) |
|
|||
66 | } ) |
|
|||
67 |
|
||||
68 | LinuxColors = ColorScheme( |
|
|||
69 | 'Linux',{ |
|
|||
70 | 'header' : Colors.LightRed, |
|
|||
71 | 'normal' : Colors.Normal # color off (usu. Colors.Normal) |
|
|||
72 | } ) |
|
|||
73 |
|
||||
74 | LightBGColors = ColorScheme( |
|
|||
75 | 'LightBG',{ |
|
|||
76 | 'header' : Colors.Red, |
|
|||
77 | 'normal' : Colors.Normal # color off (usu. Colors.Normal) |
|
|||
78 | } ) |
|
|||
79 |
|
||||
80 | # Build table of color schemes (needed by the parser) |
|
|||
81 | InspectColors = ColorSchemeTable([NoColor,LinuxColors,LightBGColors], |
|
|||
82 | 'Linux') |
|
|||
83 |
|
62 | |||
84 | #**************************************************************************** |
|
63 | #**************************************************************************** | |
85 | # Auxiliary functions and objects |
|
64 | # Auxiliary functions and objects |
@@ -51,7 +51,7 b' except AttributeError:' | |||||
51 | # strings, not bytes. See also Python issue #9969. |
|
51 | # strings, not bytes. See also Python issue #9969. | |
52 | generate_tokens = tokenize._tokenize |
|
52 | generate_tokens = tokenize._tokenize | |
53 |
|
53 | |||
54 | from IPython.utils.coloransi import * |
|
54 | from IPython.utils.coloransi import TermColors, InputTermColors ,ColorScheme, ColorSchemeTable | |
55 | from IPython.utils.py3compat import PY3 |
|
55 | from IPython.utils.py3compat import PY3 | |
56 |
|
56 | |||
57 | if PY3: |
|
57 | if PY3: | |
@@ -74,6 +74,7 b' Colors = TermColors # just a shorthand' | |||||
74 | # Build a few color schemes |
|
74 | # Build a few color schemes | |
75 | NoColor = ColorScheme( |
|
75 | NoColor = ColorScheme( | |
76 | 'NoColor',{ |
|
76 | 'NoColor',{ | |
|
77 | 'header' : Colors.NoColor, | |||
77 | token.NUMBER : Colors.NoColor, |
|
78 | token.NUMBER : Colors.NoColor, | |
78 | token.OP : Colors.NoColor, |
|
79 | token.OP : Colors.NoColor, | |
79 | token.STRING : Colors.NoColor, |
|
80 | token.STRING : Colors.NoColor, | |
@@ -89,6 +90,7 b' NoColor = ColorScheme(' | |||||
89 |
|
90 | |||
90 | LinuxColors = ColorScheme( |
|
91 | LinuxColors = ColorScheme( | |
91 | 'Linux',{ |
|
92 | 'Linux',{ | |
|
93 | 'header' : Colors.LightRed, | |||
92 | token.NUMBER : Colors.LightCyan, |
|
94 | token.NUMBER : Colors.LightCyan, | |
93 | token.OP : Colors.Yellow, |
|
95 | token.OP : Colors.Yellow, | |
94 | token.STRING : Colors.LightBlue, |
|
96 | token.STRING : Colors.LightBlue, | |
@@ -104,6 +106,7 b' LinuxColors = ColorScheme(' | |||||
104 |
|
106 | |||
105 | LightBGColors = ColorScheme( |
|
107 | LightBGColors = ColorScheme( | |
106 | 'LightBG',{ |
|
108 | 'LightBG',{ | |
|
109 | 'header' : Colors.Red, | |||
107 | token.NUMBER : Colors.Cyan, |
|
110 | token.NUMBER : Colors.Cyan, | |
108 | token.OP : Colors.Blue, |
|
111 | token.OP : Colors.Blue, | |
109 | token.STRING : Colors.Blue, |
|
112 | token.STRING : Colors.Blue, |
General Comments 0
You need to be logged in to leave comments.
Login now