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

Method color_toggle

IPython/core/ultratb.py:565–574  ·  view source on GitHub ↗

Toggle between the currently active color scheme and NoColor.

(self)

Source from the content-addressed store, hash-verified

563 self.pdb.set_colors(*args, **kw)
564
565 def color_toggle(self):
566 """Toggle between the currently active color scheme and NoColor."""
567
568 if self.color_scheme_table.active_scheme_name == 'NoColor':
569 self.color_scheme_table.set_active_scheme(self.old_scheme)
570 self.Colors = self.color_scheme_table.active_colors
571 else:
572 self.old_scheme = self.color_scheme_table.active_scheme_name
573 self.color_scheme_table.set_active_scheme('NoColor')
574 self.Colors = self.color_scheme_table.active_colors
575
576 def stb2text(self, stb):
577 """Convert a structured traceback (a list) to a string."""

Callers

nothing calls this directly

Calls 1

set_active_schemeMethod · 0.45

Tested by

no test coverage detected