pygsti.report.textblock

Defines the ReportText class

Module Contents

Classes

ReportText

Text representation, renderable in multiple formats

class pygsti.report.textblock.ReportText(text, form=None)

Bases: object

Text representation, renderable in multiple formats

Parameters
  • text (str, bytes, or list) – The text to display, possibly in need of processing as specified by fmt.

  • form ({ None, "VerbosityPrinter" }) – What format text is in. If None, then plain text that doesn’t require any processing is assumed. If “VerbosityPrinter”, then text is assumed to be a list of (type, level, message) tuples as recorded by a VerbosityPrinter object.

render(self, fmt, text_id=None)

Render this text-block object

Parameters
  • fmt (string) – name of format to be used

  • text_id (string) – an ID to use in formats where it is applicable

Returns

string

__str__(self)

Return str(self).