Question

What is out there on conventions and tools for documenting python source code?

Was it helpful?

Solution

Epydoc is also a good tool for documenting source code, and handles cross-referencing classes, modules, variables, etc, into HTML, PDF, LaTeX. Draws some nice class inheritance diagrams too. It's used by a number of open-source projects, so it's fairly actively developed.

OTHER TIPS

Conventions: PEP 257 and PEP 8. Note, that docstrings can be written in reStructuredText

Tools for generating documentation: for example Sphinx

First, put comments in your docstrings using RestructuredText format.

Second, get sphinx.

Third, create an index that uses the autodoc extension.

Then, run Sphinx to get really nice documentation.

It's very nice to put code documentation in the code itself. See:

using doxypy filter with doxygen is a good thing also

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top