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)
| 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): |
nothing calls this directly
no outgoing calls
no test coverage detected