Sweave for python
I have written a Python implementation of Sweave called Pweave that implements basic functionality and some options of Sweave for Python code embedded in reST or Latex document. You can get it here: http://mpastell.com/pweave and see the original blog post here: http://mpastell.com/2010/03/03/pweave-sweave-for-python/
Some suggestions:
- I have been using Pweave for several years now, and it is very similar to Sweave. Highly recommended.
- The most popular tool for embedded reports in python at this stage is Jupyter notebooks, which allow you to embed markdown, and they are quite useful although I personally still like writing things in LaTeX...
- You can also have a look at PyLit, which is intended for literate programming with Python, but not as well maintained as some of the alternatives.
- Sphinx is great for documenting with python, and can output LaTex.
- Here's a list of tools for literate programming. Some of these work with any programming language.