active_renderer

Contents

active_renderer#

treescope.active_renderer: context.ContextualValue[renderers.TreescopeRenderer]#

The default renderer to use when rendering a tree to HTML.

This determines the set of handlers and postprocessors to use when rendering an object.

This can be overridden locally to reconfigure how nodes are rendered with treescope. Users are free to set this to an arbitrary renderer of their choice, and programs should not assume the renderer has a particular form. Library functions can retrieve the current value of this to render objects in a user-configurable way, and can optionally make further adjustments using TreescopeRenderer.extend_with.