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

Method __init__

IPython/utils/PyColorize.py:180–196  ·  view source on GitHub ↗

Create a parser with a specified color table and output channel. Call format() to process code.

(self, color_table=None, out = sys.stdout, parent=None, style=None)

Source from the content-addressed store, hash-verified

178 """
179
180 def __init__(self, color_table=None, out = sys.stdout, parent=None, style=None):
181 """ Create a parser with a specified color table and output channel.
182
183 Call format() to process code.
184 """
185
186 super(Parser, self).__init__(parent=parent)
187
188 self.color_table = color_table if color_table else ANSICodeColors
189 self.out = out
190 self.pos = None
191 self.lines = None
192 self.raw = None
193 if not style:
194 self.style = self.default_style
195 else:
196 self.style = style
197
198
199 def format(self, raw, out=None, scheme=Undefined):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected