Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

sphinxcontrib-pyexec

Project Description
# PyExec

[![Documentation Status](https://readthedocs.org/projects/sphinxcontrib-pyexec/badge/?version=latest)](http://sphinxcontrib-pyexec.readthedocs.io/en/latest/?badge=latest) [![Build Status](https://travis-ci.org/3ptscience/sphinxcontrib-pyexec.svg?branch=master)](https://travis-ci.org/3ptscience/sphinxcontrib-pyexec)


A sphinx extension for running python code and displaying both the input and
output [sphinx documentation](http://www.sphinx-doc.org/).

In the conf.py add `PyExec` to your extensions.

In the ReStructuredText file, use the `exec` environment

```
.. exec::
print 2 + 2
```

To output python code & the results in your documentation.

```
>> print 2 + 2
4
```

Note that you need to include the `print` statement for the output to be shown. To see it in action, checkout the [Properties documentation](http://propertiespy.readthedocs.io/).

Based on

- https://github.com/sphinx-doc/sphinx/blob/master/sphinx/directives/code.py
- http://stackoverflow.com/a/18143318/6086999
Release History

Release History

This version
History Node

0.0.4

History Node

0.0.3

History Node

0.0.2

History Node

0.0.1

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
sphinxcontrib-pyexec-0.0.4.tar.gz (4.3 kB) Copy SHA256 Checksum SHA256 Source Jun 14, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting