MCPcopy Create free account
hub / github.com/ipython/ipython / __init__

Method __init__

IPython/utils/coloransi.py:135–152  ·  view source on GitHub ↗

Create a table of color schemes. The table can be created empty and manually filled or it can be created with a list of valid color schemes AND the specification for the default active scheme.

(self, scheme_list=None, default_scheme='')

Source from the content-addressed store, hash-verified

133 active_colors -> actual color table of the active scheme"""
134
135 def __init__(self, scheme_list=None, default_scheme=''):
136 """Create a table of color schemes.
137
138 The table can be created empty and manually filled or it can be
139 created with a list of valid color schemes AND the specification for
140 the default active scheme.
141 """
142
143 # create object attributes to be set later
144 self.active_scheme_name = ''
145 self.active_colors = None
146
147 if scheme_list:
148 if default_scheme == '':
149 raise ValueError('you must specify the default color scheme')
150 for scheme in scheme_list:
151 self.add_scheme(scheme)
152 self.set_active_scheme(default_scheme)
153
154 def copy(self):
155 """Return full copy of object"""

Callers

nothing calls this directly

Calls 2

add_schemeMethod · 0.95
set_active_schemeMethod · 0.95

Tested by

no test coverage detected