finesse.utilities.logging.tracebacks

finesse.utilities.logging.tracebacks(tracebacks=True)[source]

Show or hide tracebacks in the encapsulated context.

Some environments, such as Jupyterlab, hide tracebacks by default. This context allows tracebacks to be forcefully shown or hidden temporarily.

Parameters
tracebacksbool, optional

Show tracebacks. Defaults to True.

Examples

Print tracebacks during a run.

>>> from finesse import Model
>>> from finesse.utilities import tracebacks
>>> model = Model()
>>> with tracebacks():
>>>     model.parse("laser l1 L=1")