as_readout_node

as_readout_node(obj, caption=None, dispatch=True, **opts): 

Turn a displayable or data object into a readout node:

  • readout nodes pass through; a Readout becomes a section; registered adapters take precedence over built-in conversions and objects’ own to_readout methods
  • McUtils Graphics: matplotlib/SVG backends -> ReadoutPlot; x3d -> ReadoutScene (HTML); mesh3D -> ReadoutScene (HTML + PowerPoint)
  • X3D objects -> ReadoutScene; Mesh3DAnimation -> animated ReadoutScene
  • TeX expressions/equations -> ReadoutEquation; other TeX writers -> LaTeX ReadoutCode
  • JHTML elements / Apps components -> ReadoutHTML; PowerPoint primitives -> ReadoutPresML
  • TabularData/FieldSet/ArrayData, pandas DataFrames, dicts, arrays, PNG bytes, strings

dispatch=False skips registered adapters and the object’s own to_readout (used by adapters to embed the underlying view without dispatching back to themselves).


Feedback

Examples

Templates

Documentation