Restructured text is the broadly-supported approach to documenting Python code. It's basically a set of conventions to format text files through the use of punctuation, using the same basic approach that many people have used in contexts like email and readme files. Restructured Text basically formalized these hokey conventions into a slightly hokey set of rules that can be used to put together readable, formatted text files, which can be processed using utilities like Sphinx:
Sphinx is a documentation engine, developed to generate formatted documentation of source code. It is mainly designed to support Python projects, and it has cool features for documentation of Phython code. It can pull in structured comments (called Docstrings) directly from source code, using directives like automodule, autoclass and autofunction. Most importantly, it has the ability to assemble documents into a single internally-linked document structure, using things like toctree. Here's an example of an RST file for Sphinx:
.. Note This is a template for meeting notes.
Update this as appropriate.
.. header:: Notes: Stephen
.. meta-data fields for Sphinx:
.. index:: template
.. sectionauthor:: Stephen
.. Substitutions here:
.. |reST| replace:: reStructuredText
.. image:: ./image.png
.. sidebar:: callouts
Include callouts here
Template: Notes
==============================================
Topic:
-------
#. Topic 1
#. Topic 2
#. Topic 3
This file is entitled "Template: Notes". It's got a lot of comments at the beginning, including the header and sectionauthor field. It contains a substitution directive, which lets you type "reST" instead of "reStructuredText". It inserts an image into the document and has a sidebar comment. When this is rendered in Sphinx, it will all get assembled into a document format of your choice: html, pdf or even ePub.
Lately, I've discovered that RST/Sphinx is actually a pretty good answer to note taking applications like Microsoft OneNote and Evernote. RST files are lightweight and easy to read, and when assembled by Sphinx, they constitute a highly readable notebook that can be used to track personal notes over time (including searching and indexing.
I'd recommend taking a look at RST and Sphinx. The Sphinx engine is available for download from here: http://www.sphinx-doc.org/en/stable/. I've included a cheat-sheet of my favorite Sphinx terms below: