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

Class ColorScheme

IPython/utils/coloransi.py:111–124  ·  view source on GitHub ↗

Generic color scheme class. Just a name and a Struct.

Source from the content-addressed store, hash-verified

109 setattr(NoColors, name, '')
110
111class ColorScheme:
112 """Generic color scheme class. Just a name and a Struct."""
113 def __init__(self,__scheme_name_,colordict=None,**colormap):
114 self.name = __scheme_name_
115 if colordict is None:
116 self.colors = Struct(**colormap)
117 else:
118 self.colors = Struct(colordict)
119
120 def copy(self,name=None):
121 """Return a full copy of the object, optionally renaming it."""
122 if name is None:
123 name = self.name
124 return ColorScheme(name, self.colors.dict())
125
126class ColorSchemeTable(dict):
127 """General class to handle tables of color schemes.

Callers 3

PyColorize.pyFile · 0.90
exception_colorsFunction · 0.90
copyMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected