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

Method __init__

IPython/core/ultratb.py:1307–1328  ·  view source on GitHub ↗
(self, mode='Plain', color_scheme='Linux', call_pdb=False,
                 ostream=None,
                 tb_offset=0, long_header=False, include_vars=False,
                 check_cache=None, debugger_cls=None,
                 parent=None, config=None)

Source from the content-addressed store, hash-verified

1305 like Python shells). """
1306
1307 def __init__(self, mode='Plain', color_scheme='Linux', call_pdb=False,
1308 ostream=None,
1309 tb_offset=0, long_header=False, include_vars=False,
1310 check_cache=None, debugger_cls=None,
1311 parent=None, config=None):
1312
1313 # NEVER change the order of this list. Put new modes at the end:
1314 self.valid_modes = ['Plain', 'Context', 'Verbose', 'Minimal']
1315 self.verbose_modes = self.valid_modes[1:3]
1316
1317 VerboseTB.__init__(self, color_scheme=color_scheme, call_pdb=call_pdb,
1318 ostream=ostream, tb_offset=tb_offset,
1319 long_header=long_header, include_vars=include_vars,
1320 check_cache=check_cache, debugger_cls=debugger_cls,
1321 parent=parent, config=config)
1322
1323 # Different types of tracebacks are joined with different separators to
1324 # form a single string. They are taken from this dict
1325 self._join_chars = dict(Plain='', Context='\n', Verbose='\n',
1326 Minimal='')
1327 # set_mode also sets the tb_join_char attribute
1328 self.set_mode(mode)
1329
1330 def structured_traceback(self, etype, value, tb, tb_offset=None, number_of_lines_of_context=5):
1331 tb_offset = self.tb_offset if tb_offset is None else tb_offset

Callers

nothing calls this directly

Calls 2

set_modeMethod · 0.95
__init__Method · 0.45

Tested by

no test coverage detected