235 lines
11 KiB
HTML
235 lines
11 KiB
HTML
|
||
<!DOCTYPE html>
|
||
|
||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||
<head>
|
||
<meta charset="utf-8" />
|
||
<title>Introduction — Python 3.7.4 documentation</title>
|
||
<link rel="stylesheet" href="../_static/pydoctheme.css" type="text/css" />
|
||
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
||
|
||
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
|
||
<script type="text/javascript" src="../_static/jquery.js"></script>
|
||
<script type="text/javascript" src="../_static/underscore.js"></script>
|
||
<script type="text/javascript" src="../_static/doctools.js"></script>
|
||
<script type="text/javascript" src="../_static/language_data.js"></script>
|
||
|
||
<script type="text/javascript" src="../_static/sidebar.js"></script>
|
||
|
||
<link rel="search" type="application/opensearchdescription+xml"
|
||
title="Search within Python 3.7.4 documentation"
|
||
href="../_static/opensearch.xml"/>
|
||
<link rel="author" title="About these documents" href="../about.html" />
|
||
<link rel="index" title="Index" href="../genindex.html" />
|
||
<link rel="search" title="Search" href="../search.html" />
|
||
<link rel="copyright" title="Copyright" href="../copyright.html" />
|
||
<link rel="next" title="Built-in Functions" href="functions.html" />
|
||
<link rel="prev" title="The Python Standard Library" href="index.html" />
|
||
<link rel="shortcut icon" type="image/png" href="../_static/py.png" />
|
||
<link rel="canonical" href="https://docs.python.org/3/library/intro.html" />
|
||
|
||
<script type="text/javascript" src="../_static/copybutton.js"></script>
|
||
<script type="text/javascript" src="../_static/switchers.js"></script>
|
||
|
||
|
||
|
||
<style>
|
||
@media only screen {
|
||
table.full-width-table {
|
||
width: 100%;
|
||
}
|
||
}
|
||
</style>
|
||
|
||
|
||
</head><body>
|
||
|
||
<div class="related" role="navigation" aria-label="related navigation">
|
||
<h3>Navigation</h3>
|
||
<ul>
|
||
<li class="right" style="margin-right: 10px">
|
||
<a href="../genindex.html" title="General Index"
|
||
accesskey="I">index</a></li>
|
||
<li class="right" >
|
||
<a href="../py-modindex.html" title="Python Module Index"
|
||
>modules</a> |</li>
|
||
<li class="right" >
|
||
<a href="functions.html" title="Built-in Functions"
|
||
accesskey="N">next</a> |</li>
|
||
<li class="right" >
|
||
<a href="index.html" title="The Python Standard Library"
|
||
accesskey="P">previous</a> |</li>
|
||
<li><img src="../_static/py.png" alt=""
|
||
style="vertical-align: middle; margin-top: -1px"/></li>
|
||
<li><a href="https://www.python.org/">Python</a> »</li>
|
||
<li>
|
||
<span class="language_switcher_placeholder">en</span>
|
||
<span class="version_switcher_placeholder">3.7.4</span>
|
||
<a href="../index.html">Documentation </a> »
|
||
</li>
|
||
|
||
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">The Python Standard Library</a> »</li>
|
||
<li class="right">
|
||
|
||
|
||
<div class="inline-search" style="display: none" role="search">
|
||
<form class="inline-search" action="../search.html" 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>
|
||
|
|
||
</li>
|
||
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="document">
|
||
<div class="documentwrapper">
|
||
<div class="bodywrapper">
|
||
<div class="body" role="main">
|
||
|
||
<div class="section" id="introduction">
|
||
<span id="library-intro"></span><h1>Introduction<a class="headerlink" href="#introduction" title="Permalink to this headline">¶</a></h1>
|
||
<p>The “Python library” contains several different kinds of components.</p>
|
||
<p>It contains data types that would normally be considered part of the “core” of a
|
||
language, such as numbers and lists. For these types, the Python language core
|
||
defines the form of literals and places some constraints on their semantics, but
|
||
does not fully define the semantics. (On the other hand, the language core does
|
||
define syntactic properties like the spelling and priorities of operators.)</p>
|
||
<p>The library also contains built-in functions and exceptions — objects that can
|
||
be used by all Python code without the need of an <a class="reference internal" href="../reference/simple_stmts.html#import"><code class="xref std std-keyword docutils literal notranslate"><span class="pre">import</span></code></a> statement.
|
||
Some of these are defined by the core language, but many are not essential for
|
||
the core semantics and are only described here.</p>
|
||
<p>The bulk of the library, however, consists of a collection of modules. There are
|
||
many ways to dissect this collection. Some modules are written in C and built
|
||
in to the Python interpreter; others are written in Python and imported in
|
||
source form. Some modules provide interfaces that are highly specific to
|
||
Python, like printing a stack trace; some provide interfaces that are specific
|
||
to particular operating systems, such as access to specific hardware; others
|
||
provide interfaces that are specific to a particular application domain, like
|
||
the World Wide Web. Some modules are available in all versions and ports of
|
||
Python; others are only available when the underlying system supports or
|
||
requires them; yet others are available only when a particular configuration
|
||
option was chosen at the time when Python was compiled and installed.</p>
|
||
<p>This manual is organized “from the inside out:” it first describes the built-in
|
||
functions, data types and exceptions, and finally the modules, grouped in
|
||
chapters of related modules.</p>
|
||
<p>This means that if you start reading this manual from the start, and skip to the
|
||
next chapter when you get bored, you will get a reasonable overview of the
|
||
available modules and application areas that are supported by the Python
|
||
library. Of course, you don’t <em>have</em> to read it like a novel — you can also
|
||
browse the table of contents (in front of the manual), or look for a specific
|
||
function, module or term in the index (in the back). And finally, if you enjoy
|
||
learning about random subjects, you choose a random page number (see module
|
||
<a class="reference internal" href="random.html#module-random" title="random: Generate pseudo-random numbers with various common distributions."><code class="xref py py-mod docutils literal notranslate"><span class="pre">random</span></code></a>) and read a section or two. Regardless of the order in which you
|
||
read the sections of this manual, it helps to start with chapter
|
||
<a class="reference internal" href="functions.html#built-in-funcs"><span class="std std-ref">Built-in Functions</span></a>, as the remainder of the manual assumes familiarity with
|
||
this material.</p>
|
||
<p>Let the show begin!</p>
|
||
<div class="section" id="notes-on-availability">
|
||
<span id="availability"></span><h2>Notes on availability<a class="headerlink" href="#notes-on-availability" title="Permalink to this headline">¶</a></h2>
|
||
<ul class="simple">
|
||
<li><p>An “Availability: Unix” note means that this function is commonly found on
|
||
Unix systems. It does not make any claims about its existence on a specific
|
||
operating system.</p></li>
|
||
<li><p>If not separately noted, all functions that claim “Availability: Unix” are
|
||
supported on Mac OS X, which builds on a Unix core.</p></li>
|
||
</ul>
|
||
</div>
|
||
</div>
|
||
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
|
||
<div class="sphinxsidebarwrapper">
|
||
<h3><a href="../contents.html">Table of Contents</a></h3>
|
||
<ul>
|
||
<li><a class="reference internal" href="#">Introduction</a><ul>
|
||
<li><a class="reference internal" href="#notes-on-availability">Notes on availability</a></li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
|
||
<h4>Previous topic</h4>
|
||
<p class="topless"><a href="index.html"
|
||
title="previous chapter">The Python Standard Library</a></p>
|
||
<h4>Next topic</h4>
|
||
<p class="topless"><a href="functions.html"
|
||
title="next chapter">Built-in Functions</a></p>
|
||
<div role="note" aria-label="source link">
|
||
<h3>This Page</h3>
|
||
<ul class="this-page-menu">
|
||
<li><a href="../bugs.html">Report a Bug</a></li>
|
||
<li>
|
||
<a href="https://github.com/python/cpython/blob/3.7/Doc/library/intro.rst"
|
||
rel="nofollow">Show Source
|
||
</a>
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="clearer"></div>
|
||
</div>
|
||
<div class="related" role="navigation" aria-label="related navigation">
|
||
<h3>Navigation</h3>
|
||
<ul>
|
||
<li class="right" style="margin-right: 10px">
|
||
<a href="../genindex.html" title="General Index"
|
||
>index</a></li>
|
||
<li class="right" >
|
||
<a href="../py-modindex.html" title="Python Module Index"
|
||
>modules</a> |</li>
|
||
<li class="right" >
|
||
<a href="functions.html" title="Built-in Functions"
|
||
>next</a> |</li>
|
||
<li class="right" >
|
||
<a href="index.html" title="The Python Standard Library"
|
||
>previous</a> |</li>
|
||
<li><img src="../_static/py.png" alt=""
|
||
style="vertical-align: middle; margin-top: -1px"/></li>
|
||
<li><a href="https://www.python.org/">Python</a> »</li>
|
||
<li>
|
||
<span class="language_switcher_placeholder">en</span>
|
||
<span class="version_switcher_placeholder">3.7.4</span>
|
||
<a href="../index.html">Documentation </a> »
|
||
</li>
|
||
|
||
<li class="nav-item nav-item-1"><a href="index.html" >The Python Standard Library</a> »</li>
|
||
<li class="right">
|
||
|
||
|
||
<div class="inline-search" style="display: none" role="search">
|
||
<form class="inline-search" action="../search.html" 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>
|
||
|
|
||
</li>
|
||
|
||
</ul>
|
||
</div>
|
||
<div class="footer">
|
||
© <a href="../copyright.html">Copyright</a> 2001-2019, Python Software Foundation.
|
||
<br />
|
||
The Python Software Foundation is a non-profit corporation.
|
||
<a href="https://www.python.org/psf/donations/">Please donate.</a>
|
||
<br />
|
||
Last updated on Jul 13, 2019.
|
||
<a href="../bugs.html">Found a bug</a>?
|
||
<br />
|
||
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 2.0.1.
|
||
</div>
|
||
|
||
</body>
|
||
</html> |