mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-10-06 06:31:02 +00:00
python-3.6.zip added from Github
README.cosmo contains the necessary links.
This commit is contained in:
parent
75fc601ff5
commit
0c4c56ff39
4219 changed files with 1968626 additions and 0 deletions
13
third_party/python/Doc/tools/templates/customsourcelink.html
vendored
Normal file
13
third_party/python/Doc/tools/templates/customsourcelink.html
vendored
Normal file
|
@ -0,0 +1,13 @@
|
|||
{%- if show_source and has_source and sourcename %}
|
||||
<div role="note" aria-label="source link">
|
||||
<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">{{ _('Show Source') }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
{%- endif %}
|
65
third_party/python/Doc/tools/templates/download.html
vendored
Normal file
65
third_party/python/Doc/tools/templates/download.html
vendored
Normal file
|
@ -0,0 +1,65 @@
|
|||
{% 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>Download Python {{ release }} Documentation</h1>
|
||||
|
||||
{% if last_updated %}<p><b>Last updated on: {{ last_updated }}.</b></p>{% endif %}
|
||||
|
||||
<p>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.</p>
|
||||
|
||||
<table class="docutils">
|
||||
<tr><th>Format</th><th>Packed as .zip</th><th>Packed as .tar.bz2</th></tr>
|
||||
<tr><td>PDF (US-Letter paper size)</td>
|
||||
<td><a href="{{ dlbase }}/python-{{ release }}-docs-pdf-letter.zip">Download</a> (ca. 13 MB)</td>
|
||||
<td><a href="{{ dlbase }}/python-{{ release }}-docs-pdf-letter.tar.bz2">Download</a> (ca. 13 MB)</td>
|
||||
</tr>
|
||||
<tr><td>PDF (A4 paper size)</td>
|
||||
<td><a href="{{ dlbase }}/python-{{ release }}-docs-pdf-a4.zip">Download</a> (ca. 13 MB)</td>
|
||||
<td><a href="{{ dlbase }}/python-{{ release }}-docs-pdf-a4.tar.bz2">Download</a> (ca. 13 MB)</td>
|
||||
</tr>
|
||||
<tr><td>HTML</td>
|
||||
<td><a href="{{ dlbase }}/python-{{ release }}-docs-html.zip">Download</a> (ca. 9 MB)</td>
|
||||
<td><a href="{{ dlbase }}/python-{{ release }}-docs-html.tar.bz2">Download</a> (ca. 6 MB)</td>
|
||||
</tr>
|
||||
<tr><td>Plain Text</td>
|
||||
<td><a href="{{ dlbase }}/python-{{ release }}-docs-text.zip">Download</a> (ca. 3 MB)</td>
|
||||
<td><a href="{{ dlbase }}/python-{{ release }}-docs-text.tar.bz2">Download</a> (ca. 2 MB)</td>
|
||||
</tr>
|
||||
<tr><td>EPUB</td>
|
||||
<td><a href="{{ dlbase }}/python-{{ release }}-docs.epub">Download</a> (ca. 5.5 MB)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<p>These archives contain all the content in the documentation.</p>
|
||||
|
||||
<p>HTML Help (<tt>.chm</tt>) files are made available in the "Windows" section
|
||||
on the <a href="https://www.python.org/downloads/release/python-{{ release.replace('.', '') }}/">Python
|
||||
download page</a>.</p>
|
||||
|
||||
|
||||
<h2>Unpacking</h2>
|
||||
|
||||
<p>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.</p>
|
||||
|
||||
<p>Windows users can use the ZIP archives since those are customary on that
|
||||
platform. These are created on Unix using the InfoZIP zip program.</p>
|
||||
|
||||
|
||||
<h2>Problems</h2>
|
||||
|
||||
<p>If you have comments or suggestions for the Python documentation, please send
|
||||
email to <a href="mailto:docs@python.org">docs@python.org</a>.</p>
|
||||
{% endblock %}
|
7
third_party/python/Doc/tools/templates/dummy.html
vendored
Normal file
7
third_party/python/Doc/tools/templates/dummy.html
vendored
Normal file
|
@ -0,0 +1,7 @@
|
|||
This file is not an actual template, but used to add some
|
||||
texts in extensions to sphinx.pot file.
|
||||
|
||||
In extensions/pyspecific.py:
|
||||
|
||||
{% trans %}CPython implementation detail:{% endtrans %}
|
||||
{% trans %}Deprecated since version {deprecated}, will be removed in version {removed}{% endtrans %}
|
66
third_party/python/Doc/tools/templates/indexcontent.html
vendored
Normal file
66
third_party/python/Doc/tools/templates/indexcontent.html
vendored
Normal 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 & 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 %}
|
21
third_party/python/Doc/tools/templates/indexsidebar.html
vendored
Normal file
21
third_party/python/Doc/tools/templates/indexsidebar.html
vendored
Normal 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.10/">{% trans %}Python 3.10 (in development){% endtrans %}</a></li>
|
||||
<li><a href="https://docs.python.org/3.9/">{% trans %}Python 3.9 (pre-release){% 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/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>
|
129
third_party/python/Doc/tools/templates/layout.html
vendored
Normal file
129
third_party/python/Doc/tools/templates/layout.html
vendored
Normal file
|
@ -0,0 +1,129 @@
|
|||
{% 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 no longer supported.
|
||||
You should upgrade, and read the {% endtrans %}
|
||||
<a href="/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 %}
|
||||
{%- macro searchbox() %}
|
||||
{# modified from sphinx/themes/basic/searchbox.html #}
|
||||
{%- if builder != "htmlhelp" %}
|
||||
<div class="inline-search" style="display: none" role="search">
|
||||
<form class="inline-search" action="{{ pathto('search') }}" method="get">
|
||||
<input placeholder="{{ _('Quick search') }}" type="text" name="q" />
|
||||
<input type="submit" value="{{ _('Go') }}" />
|
||||
<input type="hidden" name="check_keywords" value="yes" />
|
||||
<input type="hidden" name="area" value="default" />
|
||||
</form>
|
||||
</div>
|
||||
<script type="text/javascript">$('.inline-search').show(0);</script>
|
||||
{%- endif %}
|
||||
{%- endmacro %}
|
||||
{% block relbar1 %} {% if builder != 'qthelp' %} {{ relbar() }} {% endif %} {% endblock %}
|
||||
{% block relbar2 %} {% if builder != 'qthelp' %} {{ relbar() }} {% endif %} {% endblock %}
|
||||
{% block relbaritems %}
|
||||
{%- if pagename != "search" and builder != "singlehtml" and builder != "htmlhelp" %}
|
||||
<li class="right">
|
||||
{{ searchbox() }}
|
||||
{{ reldelim2 }}
|
||||
</li>
|
||||
{%- 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/3/{{pagename}}.html" />
|
||||
{% if builder != "htmlhelp" %}
|
||||
{% 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 %}
|
||||
{% if pagename == 'whatsnew/changelog' and not embedded %}
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
// add the search form and bind the events
|
||||
$('h1').after([
|
||||
'<p>Filter entries by content:',
|
||||
'<input type="text" value="" id="searchbox" style="width: 50%">',
|
||||
'<input type="submit" id="searchbox-submit" value="Filter"></p>'
|
||||
].join('\n'));
|
||||
|
||||
function dofilter() {
|
||||
try {
|
||||
var query = new RegExp($('#searchbox').val(), 'i');
|
||||
}
|
||||
catch (e) {
|
||||
return; // not a valid regex (yet)
|
||||
}
|
||||
// find headers for the versions (What's new in Python X.Y.Z?)
|
||||
$('#changelog h2').each(function(index1, h2) {
|
||||
var h2_parent = $(h2).parent();
|
||||
var sections_found = 0;
|
||||
// find headers for the sections (Core, Library, etc.)
|
||||
h2_parent.find('h3').each(function(index2, h3) {
|
||||
var h3_parent = $(h3).parent();
|
||||
var entries_found = 0;
|
||||
// find all the entries
|
||||
h3_parent.find('li').each(function(index3, li) {
|
||||
var li = $(li);
|
||||
// check if the query matches the entry
|
||||
if (query.test(li.text())) {
|
||||
li.show();
|
||||
entries_found++;
|
||||
}
|
||||
else {
|
||||
li.hide();
|
||||
}
|
||||
});
|
||||
// if there are entries, show the section, otherwise hide it
|
||||
if (entries_found > 0) {
|
||||
h3_parent.show();
|
||||
sections_found++;
|
||||
}
|
||||
else {
|
||||
h3_parent.hide();
|
||||
}
|
||||
});
|
||||
if (sections_found > 0)
|
||||
h2_parent.show();
|
||||
else
|
||||
h2_parent.hide();
|
||||
});
|
||||
}
|
||||
$('#searchbox').keyup(dofilter);
|
||||
$('#searchbox-submit').click(dofilter);
|
||||
});
|
||||
</script>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{{ super() }}
|
||||
{% endblock %}
|
||||
{% block footer %}
|
||||
<div class="footer">
|
||||
© <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_updated=last_updated|e %}Last updated on {{ last_updated }}.{% 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 %}
|
4
third_party/python/Doc/tools/templates/opensearch.xml
vendored
Normal file
4
third_party/python/Doc/tools/templates/opensearch.xml
vendored
Normal 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 %}
|
Loading…
Add table
Add a link
Reference in a new issue