Import Upstream version 2.7.18

This commit is contained in:
geos_one
2025-08-15 16:28:06 +02:00
commit ba1f69ab39
4521 changed files with 1778434 additions and 0 deletions

View File

@@ -0,0 +1,102 @@
{% extends "layout.html" %}
{% set title = 'Download' %}
{% if daily is defined %}
{% set dlbase = pathto('archives', 1) %}
{% else %}
{% set dlbase = 'https://docs.python.org/ftp/python/doc/' + release %}
{% endif %}
{% block body %}
<h1>{% trans %}Download Python {{ release }} Documentation{% endtrans %}</h1>
{% if last_updated %}
<p><b>{% trans %}Last updated on: {{ last_updated }}.{% endtrans %}</b></p>
{% endif %}
<p>{% trans %}To download an archive containing all the documents for
this version of Python in one of various formats, follow one of links
in this table. The numbers in the table are the size of the download
files in megabytes.{% endtrans %}</p>
<table class="docutils">
<tr><th>{% trans %}Format{% endtrans %}</th>
<th>{% trans %}Packed as .zip{% endtrans %}</th>
<th>{% trans %}Packed as .tar.bz2{% endtrans %}</th>
</tr>
<tr><td>{% trans %}PDF (US-Letter paper size){% endtrans %}</td>
<td>
<a href="{{ dlbase }}/python-{{ release }}-docs-pdf-letter.zip">
{% trans %}Download{% endtrans %}
</a> {% trans %}(ca. 11 MB){% endtrans %}
</td>
<td>
<a href="{{ dlbase }}/python-{{ release }}-docs-pdf-letter.tar.bz2">
{% trans %}Download{% endtrans %}
</a> {% trans %}(ca. 11 MB){% endtrans %}
</td>
</tr>
<tr><td>{% trans %}PDF (A4 paper size){% endtrans %}</td>
<td>
<a href="{{ dlbase }}/python-{{ release }}-docs-pdf-a4.zip">
{% trans %}Download{% endtrans %}
</a> {% trans %}(ca. 11 MB){% endtrans %}</td>
<td>
<a href="{{ dlbase }}/python-{{ release }}-docs-pdf-a4.tar.bz2">
{% trans %}Download{% endtrans %}
</a> {% trans %}(ca. 11 MB){% endtrans %}</td>
</tr>
<tr><td>{% trans %}HTML{% endtrans %}</td>
<td>
<a href="{{ dlbase }}/python-{{ release }}-docs-html.zip">
{% trans %}Download{% endtrans %}
</a> {% trans %}(ca. 7.5 MB){% endtrans %}
</td>
<td>
<a href="{{ dlbase }}/python-{{ release }}-docs-html.tar.bz2">
{% trans %}Download{% endtrans %}
</a> {% trans %}(ca. 5 MB){% endtrans %}
</td>
</tr>
<tr>
<td>{% trans %}Plain Text{% endtrans %}</td>
<td>
<a href="{{ dlbase }}/python-{{ release }}-docs-text.zip">
{% trans %}Download{% endtrans %}
</a> {% trans %}(ca. 2.5 MB){% endtrans %}
</td>
<td>
<a href="{{ dlbase }}/python-{{ release }}-docs-text.tar.bz2">
{% trans %}Download{% endtrans %}
</a> {% trans %}(ca. 2 MB){% endtrans %}
</td>
</tr>
</table>
<p>{% trans %}These archives contain all the content in the
documentation.{% endtrans %}</p>
<p>{% trans download_page="https://www.python.org/downloads/release/python-" + release.replace('.', '') + "/" %}HTML Help
(<tt>.chm</tt>) files are made available in the "Files" section
on the <a href="{{ download_page }}">Python download page</a>.{% endtrans %}</p>
<h2>{% trans %}Unpacking{% endtrans %}</h2>
<p>{% trans %}Unix users should download the .tar.bz2 archives; these
are bzipped tar archives and can be handled in the usual way using tar
and the bzip2 program. The <a href="http://www.info-zip.org">InfoZIP</a> unzip
program can be used to handle the ZIP archives if desired. The
.tar.bz2 archives provide the best compression and fastest download
times.{% endtrans %}</p>
<p>{% trans %}Windows users can use the ZIP archives since those are
customary on that platform. These are created on Unix using the
InfoZIP zip program.{% endtrans %}</p>
<h2>{% trans %}Problems{% endtrans %}</h2>
<p>{% trans %}If you have comments or suggestions for the Python
documentation, please send email to
<a href="mailto:docs@python.org">docs@python.org</a>.{% endtrans %}</p>
{% endblock %}

View File

@@ -0,0 +1,66 @@
{% extends "layout.html" %}
{%- block htmltitle -%}
<title>{{ shorttitle }}</title>
{%- endblock -%}
{% block body %}
<h1>{{ docstitle|e }}</h1>
<p>
{% trans %}Welcome! This is the documentation for Python {{ release }}.{% endtrans %}
</p>
<p><strong>{% trans %}Parts of the documentation:{% endtrans %}</strong></p>
<table class="contentstable" align="center"><tr>
<td width="50%">
<p class="biglink"><a class="biglink" href="{{ pathto("whatsnew/" + version) }}">{% trans %}What's new in Python {{ version }}?{% endtrans %}</a><br/>
<span class="linkdescr">{% trans whatsnew_index=pathto("whatsnew/index") %}or <a href="{{ whatsnew_index }}">all "What's new" documents</a> since 2.0{% endtrans %}</span></p>
<p class="biglink"><a class="biglink" href="{{ pathto("tutorial/index") }}">{% trans %}Tutorial{% endtrans %}</a><br/>
<span class="linkdescr">{% trans %}start here{% endtrans %}</span></p>
<p class="biglink"><a class="biglink" href="{{ pathto("library/index") }}">{% trans %}Library Reference{% endtrans %}</a><br/>
<span class="linkdescr">{% trans %}keep this under your pillow{% endtrans %}</span></p>
<p class="biglink"><a class="biglink" href="{{ pathto("reference/index") }}">{% trans %}Language Reference{% endtrans %}</a><br/>
<span class="linkdescr">{% trans %}describes syntax and language elements{% endtrans %}</span></p>
<p class="biglink"><a class="biglink" href="{{ pathto("using/index") }}">{% trans %}Python Setup and Usage{% endtrans %}</a><br/>
<span class="linkdescr">{% trans %}how to use Python on different platforms{% endtrans %}</span></p>
<p class="biglink"><a class="biglink" href="{{ pathto("howto/index") }}">{% trans %}Python HOWTOs{% endtrans %}</a><br/>
<span class="linkdescr">{% trans %}in-depth documents on specific topics{% endtrans %}</span></p>
</td><td width="50%">
<p class="biglink"><a class="biglink" href="{{ pathto("installing/index") }}">{% trans %}Installing Python Modules{% endtrans %}</a><br/>
<span class="linkdescr">{% trans %}installing from the Python Package Index &amp; other sources{% endtrans %}</span></p>
<p class="biglink"><a class="biglink" href="{{ pathto("distributing/index") }}">{% trans %}Distributing Python Modules{% endtrans %}</a><br/>
<span class="linkdescr">{% trans %}publishing modules for installation by others{% endtrans %}</span></p>
<p class="biglink"><a class="biglink" href="{{ pathto("extending/index") }}">{% trans %}Extending and Embedding{% endtrans %}</a><br/>
<span class="linkdescr">{% trans %}tutorial for C/C++ programmers{% endtrans %}</span></p>
<p class="biglink"><a class="biglink" href="{{ pathto("c-api/index") }}">{% trans %}Python/C API{% endtrans %}</a><br/>
<span class="linkdescr">{% trans %}reference for C/C++ programmers{% endtrans %}</span></p>
<p class="biglink"><a class="biglink" href="{{ pathto("faq/index") }}">{% trans %}FAQs{% endtrans %}</a><br/>
<span class="linkdescr">{% trans %}frequently asked questions (with answers!){% endtrans %}</span></p>
</td></tr>
</table>
<p><strong>{% trans %}Indices and tables:{% endtrans %}</strong></p>
<table class="contentstable" align="center"><tr>
<td width="50%">
<p class="biglink"><a class="biglink" href="{{ pathto("py-modindex") }}">{% trans %}Global Module Index{% endtrans %}</a><br/>
<span class="linkdescr">{% trans %}quick access to all modules{% endtrans %}</span></p>
<p class="biglink"><a class="biglink" href="{{ pathto("genindex") }}">{% trans %}General Index{% endtrans %}</a><br/>
<span class="linkdescr">{% trans %}all functions, classes, terms{% endtrans %}</span></p>
<p class="biglink"><a class="biglink" href="{{ pathto("glossary") }}">{% trans %}Glossary{% endtrans %}</a><br/>
<span class="linkdescr">{% trans %}the most important terms explained{% endtrans %}</span></p>
</td><td width="50%">
<p class="biglink"><a class="biglink" href="{{ pathto("search") }}">{% trans %}Search page{% endtrans %}</a><br/>
<span class="linkdescr">{% trans %}search this documentation{% endtrans %}</span></p>
<p class="biglink"><a class="biglink" href="{{ pathto("contents") }}">{% trans %}Complete Table of Contents{% endtrans %}</a><br/>
<span class="linkdescr">{% trans %}lists all sections and subsections{% endtrans %}</span></p>
</td></tr>
</table>
<p><strong>{% trans %}Meta information:{% endtrans %}</strong></p>
<table class="contentstable" align="center"><tr>
<td width="50%">
<p class="biglink"><a class="biglink" href="{{ pathto("bugs") }}">{% trans %}Reporting bugs{% endtrans %}</a></p>
<p class="biglink"><a class="biglink" href="{{ pathto("about") }}">{% trans %}About the documentation{% endtrans %}</a></p>
</td><td width="50%">
<p class="biglink"><a class="biglink" href="{{ pathto("license") }}">{% trans %}History and License of Python{% endtrans %}</a></p>
<p class="biglink"><a class="biglink" href="{{ pathto("copyright") }}">{% trans %}Copyright{% endtrans %}</a></p>
</td></tr>
</table>
{% endblock %}

View File

@@ -0,0 +1,21 @@
<h3>{% trans %}Download{% endtrans %}</h3>
<p><a href="{{ pathto('download') }}">{% trans %}Download these documents{% endtrans %}</a></p>
<h3>{% trans %}Docs by version{% endtrans %}</h3>
<ul>
<li><a href="https://docs.python.org/3.9/">{% trans %}Python 3.9 (in development){% endtrans %}</a></li>
<li><a href="https://docs.python.org/3.8/">{% trans %}Python 3.8 (stable){% endtrans %}</a></li>
<li><a href="https://docs.python.org/3.7/">{% trans %}Python 3.7 (stable){% endtrans %}</a></li>
<li><a href="https://docs.python.org/3.6/">{% trans %}Python 3.6 (security-fixes){% endtrans %}</a></li>
<li><a href="https://docs.python.org/3.5/">{% trans %}Python 3.5 (security-fixes){% endtrans %}</a></li>
<li><a href="https://docs.python.org/2.7/">{% trans %}Python 2.7 (EOL){% endtrans %}</a></li>
<li><a href="https://www.python.org/doc/versions/">{% trans %}All versions{% endtrans %}</a></li>
</ul>
<h3>{% trans %}Other resources{% endtrans %}</h3>
<ul>
{# XXX: many of these should probably be merged in the main docs #}
<li><a href="https://www.python.org/dev/peps/">{% trans %}PEP Index{% endtrans %}</a></li>
<li><a href="https://wiki.python.org/moin/BeginnersGuide">{% trans %}Beginner's Guide{% endtrans %}</a></li>
<li><a href="https://wiki.python.org/moin/PythonBooks">{% trans %}Book List{% endtrans %}</a></li>
<li><a href="https://www.python.org/doc/av/">{% trans %}Audio/Visual Talks{% endtrans %}</a></li>
</ul>

View File

@@ -0,0 +1,64 @@
{% extends "!layout.html" %}
{% block header %}
{%- if outdated %}
<div id="outdated-warning" style="padding: .5em; text-align: center; background-color: #FFBABA; color: #6A0E0E;">
{% trans %}This document is for an old version of Python that is {% endtrans %}<a href="https://devguide.python.org/devcycle/#end-of-life-branches">{% trans %}no longer supported{% endtrans %}</a>.
{% trans %}You should upgrade and read the {% endtrans %}
<a href="https://docs.python.org/{{ language + '/' if language and language != 'en' else '' }}3/{{ pagename }}{{ file_suffix }}">{% trans %} Python documentation for the current stable release{% endtrans %}</a>.
</div>
{%- endif %}
{% endblock %}
{% block rootrellink %}
<li><img src="{{ pathto('_static/py.png', 1) }}" alt=""
style="vertical-align: middle; margin-top: -1px"/></li>
<li><a href="https://www.python.org/">Python</a>{{ reldelim1 }}</li>
<li>
{%- if switchers is defined %}
<span class="language_switcher_placeholder">{{ language or 'en' }}</span>
<span class="version_switcher_placeholder">{{ release }}</span>
<a href="{{ pathto('index') }}">{% trans %}Documentation{% endtrans %}</a>{{ reldelim1 }}
{%- else %}
<a href="{{ pathto('index') }}">{{ shorttitle }}</a>{{ reldelim1 }}
{%- endif %}
</li>
{% endblock %}
{% block relbar1 %} {% if builder != 'qthelp' %} {{ relbar() }} {% endif %} {% endblock %}
{% block relbar2 %} {% if builder != 'qthelp' %} {{ relbar() }} {% endif %} {% endblock %}
{% block extrahead %}
<link rel="shortcut icon" type="image/png" href="{{ pathto('_static/py.png', 1) }}" />
<link rel="canonical" href="https://docs.python.org/2/{{pagename}}.html" />
{% if not embedded %}<script type="text/javascript" src="{{ pathto('_static/copybutton.js', 1) }}"></script>{% endif %}
{% if switchers is defined and not embedded %}<script type="text/javascript" src="{{ pathto('_static/switchers.js', 1) }}"></script>{% endif %}
{{ super() }}
{% if builder == 'qthelp' %}
<style type="text/css">
body { background-color: white; }
div.document { background-color: white; }
</style>
{% endif %}
{% endblock %}
{% block footer %}
<div class="footer">
&copy; <a href="{{ pathto('copyright') }}">{% trans %}Copyright{% endtrans %}</a> {{ copyright|e }}.
<br />
{% trans %}The Python Software Foundation is a non-profit corporation.{% endtrans %}
<a href="https://www.python.org/psf/donations/">{% trans %}Please donate.{% endtrans %}</a>
<br />
{% trans last_update=last_updated|e %}Last updated on {{ last_update }}.{% endtrans %}
{% trans pathto_bugs=pathto('bugs') %}<a href="{{ pathto_bugs }}">Found a bug</a>?{% endtrans %}
<br />
{% trans sphinx_version=sphinx_version|e %}Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> {{ sphinx_version }}.{% endtrans %}
</div>
{% endblock %}
{% block sidebarsourcelink %}
{%- if show_source and has_source and sourcename %}
<h3>{{ _('This Page') }}</h3>
<ul class="this-page-menu">
<li><a href="{{ pathto('bugs') }}">{% trans %}Report a Bug{% endtrans %}</a></li>
<li><a href="https://github.com/python/cpython/blob/{{ version }}/Doc/{{ sourcename|replace('.rst.txt', '.rst') }}"
rel="nofollow">{% trans %}Show Source{% endtrans %}</a>
</li>
</ul>
{%- endif %}
{% endblock %}

View File

@@ -0,0 +1,4 @@
{% extends "!opensearch.xml" %}
{% block extra -%}
<Image height="16" width="16" type="image/x-icon">https://www.python.org/images/favicon16x16.ico</Image>
{%- endblock %}