Skip to content

SymbiFlow/sphinxcontrib-session

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rst

Sphinx Contrib Session

Table of contents

Setting Up

In conf.py add 'sphinxcontrib_session' to the list of extensions as shown below (note the underscore);

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
    'sphinx.ext.intersphinx',
    'sphinx.ext.todo',
    'sphinx.ext.githubpages',
    'sphinxcontrib_session',
]

Example

pycon

>>> h = 'hello' >>> print('hello') hello >>> for i in hello: ... print(i) h e l l o >>>

Syntax

The .. session:: directive should be a drop in replacement for the .. code-block:: directive and support the same set of options.

https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html#directive-code-block

.. session:: [language]

   <statements>

https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html#directive:option-code-block-linenos :linenos: is supported but generally doesn't make much sense. https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html#directive:option-code-block-lineno-start

Supported Session Types

In theory any 'session' lexer supported by Pygments should work.

The tested sessions are:

Lexers are wanted for;

  • GDB debugging session.
  • TCL script session.

Examples

See: https://sphinxcontrib-session.rtfd.io/

Releases

No releases published

Packages

No packages published