hpcflow.app.CompactProblemFormatter#
- class hpcflow.app.CompactProblemFormatter(width=90, console_kwargs=None, output_stream=None)#
Bases:
CompactProblemFormatterCompact exception/warning formatter. Multiple instances are allowed, but only one may be enabled at any time.
Methods
Disable compact formatting of `CompactException`s and `CompactWarning`s.
Enable compact formatting of `CompactException`s and `CompactWarning`s.
Rich console for printing messages.
Attributes
The Rich colour used for exceptions.
The Rich colour used for warnings.
The IPython shell, if present.
Whether to show the traceback for `CompactException`s, in addition to the custom formatted string. Tracebacks for other exceptions are always shown.
Whether to use Rich to display tracebacks.
- get_console()#
Rich console for printing messages.
For testing, the output stream will be set to something provided by a test fixture; for normal use the output stream will be sys.stderr.
- Return type:
Console