Differences between revisions 25 and 27 (spanning 2 versions)
Revision 25 as of 2010-10-08 11:01:46
Size: 4465
Editor: MichaelFoord
Comment:
Revision 27 as of 2010-10-08 11:09:38
Size: 4500
Editor: MichaelFoord
Comment:
Deletions are marked like this. Additions are marked like this.
Line 23: Line 23:
 * [[http://sphinx.pocoo.org/ext/autodoc.html|autodoc]], a Sphinx-based processor that processes/allows reST doc strings,
Line 24: Line 25:
 * EpyDoc, http://epydoc.sourceforge.net/
Line 26: Line 26:
 * PythonDoc - uses StructuredText input format (''not'' reST), and can produce HTML and XML output. It uses XML as an intermediate representation, to simplify the addition of new output formats. http://starship.python.net/crew/danilo/pythondoc/
 * Another PythonDoc - uses JavaDoc-style comments, and produces HTML and XML output. Can also be used as a library, producing ElementTree descriptions of your source code. http://effbot.org/zone/pythondoc.htm
 * EasyDoc - uses an HTML-like markup language, similar to the language used by Wiki:JavaDoc; and produces HTML output (http://htmltmpl.sourceforge.net/easydoc.html)
Line 30: Line 27:
 * [[https://svn.enthought.com/enthought/wiki/EndoHowTo|Endo]] from Enthought Tool Suite - generates HTML API documentation from docstrings and from plain comments that immediately precede variable assignments.
 * [[http://sphinx.pocoo.org/ext/autodoc.html|autodoc]], a Sphinx-based processor that processes/allows reST doc strings,
Line 34: Line 29:
= No longer under development =

 * Another PythonDoc - uses JavaDoc-style comments, and produces HTML and XML output. Can also be used as a library, producing ElementTree descriptions of your source code. http://effbot.org/zone/pythondoc.htm
 * EpyDoc, http://epydoc.sourceforge.net/
 * [[https://svn.enthought.com/enthought/wiki/EndoHowTo|Endo]] from Enthought Tool Suite - generates HTML API documentation from docstrings and from plain comments that immediately precede variable assignments.
 * [[http://pudge.lesscode.org/|Pudge]] (defunct)
Line 35: Line 36:
 * [[http://pudge.lesscode.org/|Pudge]] (defunct)  * EasyDoc - uses an HTML-like markup language, similar to the language used by Wiki:JavaDoc; and produces HTML output (http://htmltmpl.sourceforge.net/easydoc.html)
 * PythonDoc - uses StructuredText input format (''not'' reST), and can produce HTML and XML output. It uses XML as an intermediate representation, to simplify the addition of new output formats. http://starship.python.net/crew/danilo/pythondoc/

Python modules are usually documented using docstrings. You can read a module's docstrings from the Python interactive prompt with the help() function. For example:

import distutils
help(distutils)

The help() function uses Python's standard pydoc module, as does the pydoc command that comes with Python.

The various documentation tools available generally do one of two things:

  • they either process docstrings in some way to make finding/reading documentation on a given module easier (so-called "API documentation tools"), or
  • they have nothing to do with docstrings and instead focus on processing documentation in some way (such as converting your plain text docs into html)

Currently, the Python docs consist of 2 parts:

  • the API docs that you can read using the help() command (pydoc can also provide these as html and even serve them from your local machine), and

  • the manuals/guides/howtos at http://python.org/doc/ which are written in reStructuredText (a plain text format) and processed into various output formats by the Sphinx tool.

When writing documentation for your own modules (either as manuals or docstrings (preferably both)), I suggest you use a plain text markup such as reST or Markdown.

Automatic Python API documentation generation tools

No longer under development

Documentation processing tools

Other projects that can be used to produce API documentation

  • XIST - an XML based extensible HTML generator written in Python.

  • HtmlGen - a Python library for generating HTML documents.

Other documentation processing tools

  • Pandoc -- written in Haskell, this tool can read and write a number of formats (including reST).


CategoryDocumentation

DocumentationTools (last edited 2023-02-04 13:42:35 by GilOliveira)

Unable to edit the page? See the FrontPage for instructions.