Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Sphinx extension to include program output into documents
branch: master

Merge pull request #1 from smurn/patch-1

Error tolerant output decoding
latest commit 66d7a9ae0f
Sebastian Wiesner authored
Failed to load latest commit information.
doc Add support and development docs
sphinxcontrib Error tolerant output decoding
.gitignore Git ignore list
.travis.yml Use travis for testing
CHANGES.rst master is 0.9 now
LICENSE Add license file Rename readme
README.rst Include travis status image in README
requirements.txt Add requirements file
setup.cfg Configured doc upload Fix URL



A Sphinx extension to literally insert the output of arbitrary commands into documents, helping you to keep your command examples up to date.


Install this extension from the Cheeseshop:

pip install sphinxcontrib-programoutput

The extension requires Sphinx 1.1 and Python 2.6 or Python 3.1 at least.


Just add this extension to extensions:

extensions = ['sphinxcontrib.programoutput']

Now you've two new directives program-output and command-output to insert the output of programs. The former just inserts the output:

.. program-output:: python -V


Python 2.7.1

The latter directive mimics a shell session, and is intended to show examples:

.. command-output:: python -V


$ python -V
Python 2.7.1

Please refer to the documentation for comprehensive information about usage and configuration of this extension.


Please report issues to the issue tracker if you have trouble or found a bug in this extension, but respect the following guidelines:

  • Check that the issue has not already been reported.
  • Check that the issue is not already fixed in the master branch.
  • Open issues with clear title and a detailed description in grammatically correct, complete sentences.


The source code is hosted on Github:

git clone

Please fork the repository and send pull requests with your fixes or features, but respect these guidelines:

Something went wrong with that request. Please try again.