notebook_utils.py

Checking for interactive notebook mode.

openmdao.utils.notebook_utils.cite(reference)[source]

Return the citation of the given reference path.

Parameters
referencestr

Dot path of desired class or function.

openmdao.utils.notebook_utils.display_source(reference, hide_doc_string=False)[source]

Display the source code of the given reference path to a function.

Parameters
referencestr

Dot path of desired function.

hide_doc_stringbool

Option to hide the docstring.

openmdao.utils.notebook_utils.get_code(reference, hide_doc_string=False)[source]

Return the source code of the given reference path to a function.

Parameters
referencestr

Dot path of desired function.

hide_doc_stringbool

Option to hide the docstring.

Returns
IPython.display.Code

Source code of the given class or function.

openmdao.utils.notebook_utils.notebook_mode()[source]

Check if the environment is interactive and if tabulate is installed.

Returns
bool

True if the environment is an interactive notebook.

openmdao.utils.notebook_utils.show_options_table(reference, recording_options=False)[source]

Return the options table of the given reference path.

Parameters
referencestr

Dot path of desired class or function.

recording_optionsbool

If True, display recording options instead of options.

Returns
IPython.display

Options table of the given class or function.