.. _f-sphinxrunpythonextension: module ``sphinxext.sphinx_runpython_extension`` =============================================== .. inheritance-diagram:: pyquickhelper.sphinxext.sphinx_runpython_extension Short summary +++++++++++++ module ``pyquickhelper.sphinxext.sphinx_runpython_extension`` Defines runpython directives. See `Tutorial: Writing a simple extension `_ :githublink:`%|py|8` Classes +++++++ +---------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------+ | class | truncated documentation | +===============================================================================================================+==========================================================================================+ | :class:`runpython_node ` | Defines *runpython* node. | +---------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------+ | :class:`RunPythonCompileError ` | exception raised when a piece of code included in the documentation does not compile | +---------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------+ | :class:`RunPythonDirective ` | Extracts script to run described by `` | +---------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------+ | :class:`RunPythonExecutionError ` | Exception raised when a piece of code included in the documentation raises an exception. | +---------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------+ Functions +++++++++ +----------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ | function | truncated documentation | +==========================================================================================================+=======================================================================================================================+ | :func:`depart_runpython_node ` | What to do when leaving a node :class:`runpython_node` the function should have different behaviour, depending on ... | +----------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ | :func:`run_python_script ` | Executes a script :epkg:`python` as a string. | +----------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ | :func:`setup ` | setup for ``runpython`` (sphinx) | +----------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ | :func:`visit_runpython_node ` | What to do when visiting a node :class:`runpython_node` the function should have different behaviour, depending ... | +----------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ Properties ++++++++++ +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------+ | property | truncated documentation | +===============================================================================================+===================================================================+ | :meth:`document ` | Return the `document` root node of the tree containing this Node. | +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------+ Methods +++++++ +-------------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ | method | truncated documentation | +===========================================================================================================================================+=====================================================================================================================+ | :meth:`modify_script_before_running ` | Takes the script as a string and returns another string before it is run. It does not modify what is displayed. ... | +-------------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ | :meth:`run ` | Extracts the information in a dictionary, runs the script. | +-------------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ Documentation +++++++++++++ .. automodule:: pyquickhelper.sphinxext.sphinx_runpython_extension :members: :special-members: __init__ :show-inheritance: