• Home
Name
Date
Size
#Lines
LOC

..--

c-api/12-May-2024-20,05913,329

data/12-May-2024-3,9383,142

distributing/12-May-2024-180133

distutils/12-May-2024-4,3933,146

extending/12-May-2024-3,6422,787

faq/12-May-2024-5,0663,668

howto/12-May-2024-15,26311,725

includes/12-May-2024-2,4671,812

install/12-May-2024-1,078797

installing/12-May-2024-242169

library/12-May-2024-164,484113,596

reference/12-May-2024-10,2097,679

tools/12-May-2024-2,4582,008

tutorial/12-May-2024-6,7225,113

using/12-May-2024-3,5112,395

whatsnew/12-May-2024-38,42728,844

MakefileD12-May-20248.7 KiB248186

README.rstD12-May-20244.8 KiB14294

about.rstD12-May-20241.5 KiB4028

bugs.rstD12-May-20244.6 KiB10173

conf.pyD12-May-20247.2 KiB244123

contents.rstD12-May-2024538 3225

copyright.rstD12-May-2024451 2011

glossary.rstD12-May-202456.3 KiB1,244997

license.rstD12-May-202446.5 KiB987780

make.batD12-May-20245.7 KiB180152

requirements.txtD12-May-2024556 1713

runtime.txtD12-May-20243

README.rst

1 Python Documentation README
2 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
3 
4 This directory contains the reStructuredText (reST) sources to the Python
5 documentation.  You don't need to build them yourself, `prebuilt versions are
6 available <https://docs.python.org/dev/download.html>`_.
7 
8 Documentation on authoring Python documentation, including information about
9 both style and markup, is available in the "`Documenting Python
10 <https://devguide.python.org/documenting/>`_" chapter of the
11 developers guide.
12 
13 
14 Building the docs
15 =================
16 
17 The documentation is built with several tools which are not included in this
18 tree but are maintained separately and are available from
19 `PyPI <https://pypi.org/>`_.
20 
21 * `Sphinx <https://pypi.org/project/Sphinx/>`_
22 * `blurb <https://pypi.org/project/blurb/>`_
23 * `python-docs-theme <https://pypi.org/project/python-docs-theme/>`_
24 
25 The easiest way to install these tools is to create a virtual environment and
26 install the tools into there.
27 
28 Using make
29 ----------
30 
31 To get started on UNIX, you can create a virtual environment and build
32 documentation with the commands::
33 
34   make venv
35   make html
36 
37 The virtual environment in the ``venv`` directory will contain all the tools
38 necessary to build the documentation downloaded and installed from PyPI.
39 If you'd like to create the virtual environment in a different location,
40 you can specify it using the ``VENVDIR`` variable.
41 
42 You can also skip creating the virtual environment altogether, in which case
43 the Makefile will look for instances of ``sphinxbuild`` and ``blurb``
44 installed on your process ``PATH`` (configurable with the ``SPHINXBUILD`` and
45 ``BLURB`` variables).
46 
47 On Windows, we try to emulate the Makefile as closely as possible with a
48 ``make.bat`` file. If you need to specify the Python interpreter to use,
49 set the PYTHON environment variable.
50 
51 Available make targets are:
52 
53 * "clean", which removes all build files and the virtual environment.
54 
55 * "clean-venv", which removes the virtual environment directory.
56 
57 * "venv", which creates a virtual environment with all necessary tools
58   installed.
59 
60 * "html", which builds standalone HTML files for offline viewing.
61 
62 * "htmlview", which re-uses the "html" builder, but then opens the main page
63   in your default web browser.
64 
65 * "htmlhelp", which builds HTML files and a HTML Help project file usable to
66   convert them into a single Compiled HTML (.chm) file -- these are popular
67   under Microsoft Windows, but very handy on every platform.
68 
69   To create the CHM file, you need to run the Microsoft HTML Help Workshop
70   over the generated project (.hhp) file.  The make.bat script does this for
71   you on Windows.
72 
73 * "latex", which builds LaTeX source files as input to "pdflatex" to produce
74   PDF documents.
75 
76 * "text", which builds a plain text file for each source file.
77 
78 * "epub", which builds an EPUB document, suitable to be viewed on e-book
79   readers.
80 
81 * "linkcheck", which checks all external references to see whether they are
82   broken, redirected or malformed, and outputs this information to stdout as
83   well as a plain-text (.txt) file.
84 
85 * "changes", which builds an overview over all versionadded/versionchanged/
86   deprecated items in the current version. This is meant as a help for the
87   writer of the "What's New" document.
88 
89 * "coverage", which builds a coverage overview for standard library modules and
90   C API.
91 
92 * "pydoc-topics", which builds a Python module containing a dictionary with
93   plain text documentation for the labels defined in
94   `tools/pyspecific.py` -- pydoc needs these to show topic and keyword help.
95 
96 * "suspicious", which checks the parsed markup for text that looks like
97   malformed and thus unconverted reST.
98 
99 * "check", which checks for frequent markup errors.
100 
101 * "serve", which serves the build/html directory on port 8000.
102 
103 * "dist", (Unix only) which creates distributable archives of HTML, text,
104   PDF, and EPUB builds.
105 
106 
107 Without make
108 ------------
109 
110 First, install the tool dependencies from PyPI.
111 
112 Then, from the ``Doc`` directory, run ::
113 
114    sphinx-build -b<builder> . build/<builder>
115 
116 where ``<builder>`` is one of html, text, latex, or htmlhelp (for explanations
117 see the make targets above).
118 
119 Deprecation header
120 ==================
121 
122 You can define the ``outdated`` variable in ``html_context`` to show a
123 red banner on each page redirecting to the "latest" version.
124 
125 The link points to the same page on ``/3/``, sadly for the moment the
126 language is lost during the process.
127 
128 
129 Contributing
130 ============
131 
132 Bugs in the content should be reported to the
133 `Python bug tracker <https://bugs.python.org>`_.
134 
135 Bugs in the toolset should be reported to the tools themselves.
136 
137 You can also send a mail to the Python Documentation Team at docs@python.org,
138 and we will process your request as soon as possible.
139 
140 If you want to help the Documentation Team, you are always welcome.  Just send
141 a mail to docs@python.org.
142