finesse.env module

Finesse environment information.

finesse.env.has_pygraphviz()[source]

Determine if pygraphviz and graphviz are available on the current path.

Returns

bool

True if pygraphviz and graphviz are available, False otherwise.

Notes

This returns False if either pygraphviz or graphviz is not installed or correctly configured. If pygraphviz is installed but graphviz is not installed or could not be found, an import error complaining about something like “libagraph.so.1” is emitted (see the pygraphviz FAQ).

finesse.env.info(*args, **kwargs)[source]
finesse.env.is_interactive()[source]

Check if Finesse is being run from an interactive environment.

Returns

bool

True if a Jupyter notebook, Qt console or IPython shell is in use, False otherwise.

finesse.env.session_instance()[source]
finesse.env.show_tracebacks(show_tb=None)[source]

Get or set whether to show tracebacks in Jupyter/IPython in full form or just as a single error message.

Parameters

show_tbbool, optional

Set whether to show tracebacks; defaults to None, which doesn’t change the current setting.

Returns

bool

The current setting value (if show_tb was not set) or the previous setting value (if show_tb was set).

finesse.env.tb(colors=True)[source]

Show the last traceback in full.

Parameters

colorsbool, optional

Use colored output (using ANSI escape sequences), by default True Can set to false if output is saved to a medium that doesn’t support it (for example, html and pdf docs)

finesse.env.traceback_handler_instance()[source]
finesse.env.warn(*args, stacklevel=1, **kwargs)[source]