Examples

Note

Note

This function is not suitable for sending spam e-mails.

Warning

Warning

This function is suitable for sending spam e-mails.

Version added

New in version 2.5: The spam parameter.

Version changed

Changed in version 2.6: The spam parameter.

Deprecated

Deprecated since version 3.1: Use spam() instead.

See also

See also

Module zipfile
Documentation of the zipfile standard module.
GNU tar manual, Basic Tar Format
Documentation for tar archive files, including GNU tar extensions.

There is also a “short form” allowed that looks like this:

See also

modules zipfile, tarfile

Rubric

Centered

LICENSE AGREEMENT

Hlist

  • A list of
  • short items
  • that should be
  • displayed
  • horizontally

Code-block

1
2
3
4
5
def some_function():
    interesting = False
    print 'This line is highlighted.'
    print 'This one is not...'
    print '...but this one is.'
this.py
print 'Explicit is better than implicit.'

A file may be included using the literalinclude directive.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line.
SPHINXOPTS    =
SPHINXBUILD   = sphinx-build
SOURCEDIR     = source
BUILDDIR      = build

# Put it first so that "make" without argument is like "make help".
help:
	@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option.  $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
	@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

Glossary

environment
A structure where information about all documents under the root is saved, and used for cross-referencing. The environment is pickled after the parsing stage, so that successive runs only need to read and parse new and changed documents.
source directory
The directory which, including its subdirectories, contains all source files for one Sphinx project.

Math

\[ \begin{align}\begin{aligned}(a + b)^2 = a^2 + 2ab + b^2\\(a - b)^2 = a^2 - 2ab + b^2\end{aligned}\end{align} \]
\begin{eqnarray} y & = & ax^2 + bx + c \\ f(x) & = & x^2 + 2xy + y^2 \end{eqnarray}

Production list

try_stmt  ::=  try1_stmt | try2_stmt
try1_stmt ::=  "try" ":" suite
               ("except" [expression ["," target]] ":" suite)+
               ["else" ":" suite]
               ["finally" ":" suite]
try2_stmt ::=  "try" ":" suite
               "finally" ":" suite