This is Python version 2.7.18
=============================
Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011,
2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Python Software Foundation. All
rights reserved.
Copyright (c) 2000 BeOpen.com.
All rights reserved.
Copyright (c) 1995-2001 Corporation for National Research Initiatives.
All rights reserved.
Copyright (c) 1991-1995 Stichting Mathematisch Centrum.
All rights reserved.
License information
-------------------
See the file "LICENSE" for information on the history of this
software, terms & conditions for usage, and a DISCLAIMER OF ALL
WARRANTIES.
This Python distribution contains no GNU General Public Licensed
(GPLed) code so it may be used in proprietary projects just like prior
Python distributions. There are interfaces to some GNU code but these
are entirely optional.
All trademarks referenced herein are property of their respective
holders.
What's new in this release?
---------------------------
See the file "Misc/NEWS".
If you don't read instructions
------------------------------
Congratulations on getting this far. :-)
To start building right away (on UNIX): type "./configure" in the
current directory and when it finishes, type "make". This creates an
executable "./python"; to install in /usr/local, first do "su root"
and then "make install".
The section `Build instructions' below is still recommended reading.
What is Python anyway?
----------------------
Python is an interpreted, interactive object-oriented programming
language suitable (amongst other uses) for distributed application
development, scripting, numeric computing and system testing. Python
is often compared to Tcl, Perl, Java, JavaScript, Visual Basic or
Scheme. To find out more about what Python can do for you, point your
browser to http://www.python.org/.
How do I learn Python?
----------------------
The official tutorial is still a good place to start; see
http://docs.python.org/ for online and downloadable versions, as well
as a list of other introductions, and reference documentation.
There's a quickly growing set of books on Python. See
http://wiki.python.org/moin/PythonBooks for a list.
Documentation
-------------
All documentation is provided online in a variety of formats. In
order of importance for new users: Tutorial, Library Reference,
Language Reference, Extending & Embedding, and the Python/C API. The
Library Reference is especially of immense value since much of
Python's power is described there, including the built-in data types
and functions!
All documentation is also available online at the Python web site
(http://docs.python.org/, see below). It is available online for occasional
reference, or can be downloaded in many formats for faster access. The
documentation is downloadable in HTML, PostScript, PDF, LaTeX, and
reStructuredText (2.6+) formats; the LaTeX and reStructuredText versions are
primarily for documentation authors, translators, and people with special
formatting requirements.
If you would like to contribute to the development of Python, relevant
documentation is available at:
http://docs.python.org/devguide/
For information about building Python's documentation, refer to Doc/README.txt.
Web sites
---------
New Python releases and related technologies are published at
http://www.python.org/. Come visit us!
Newsgroups and Mailing Lists
----------------------------
Read comp.lang.python, a high-volume discussion newsgroup about
Python, or comp.lang.python.announce, a low-volume moderated newsgroup
for Python-related announcements. These are also accessible as
mailing lists: see http://www.python.org/community/lists/ for an
overview of these and many other Python-related mailing lists.
Archives are accessible via the Google Groups Usenet archive; see
http://groups.google.com/. The mailing lists are also archived, see
http://www.python.org/community/lists/ for details.
Bug reports
-----------
To report or search for bugs, please use the Python Bug
Tracker at http://bugs.python.org/.
Patches and contributions
-------------------------
To submit a patch or other contribution, please use the Python Patch
Manager at http://bugs.python.org/. Guidelines
for patch submission may be found at http://www.python.org/dev/patches/.
If you have a proposal to change Python, you may want to send an email to the
comp.lang.python or python-ideas mailing lists for inital feedback. A Python
Enhancement Proposal (PEP) may be submitted if your idea gains ground. All
current PEPs, as well as guidelines for submitting a new PEP, are listed at
http://www.python.org/dev/peps/.
Questions
---------
For help, if you can't find it in the manuals or on the web site, it's
best to post to the comp.lang.python or the Python mailing list (see
above). If you specifically don't want to involve the newsgroup or
mailing list, send questions to help@python.org (a group of volunteers
who answer questions as they can). The newsgroup is the most
efficient way to ask public questions.
Build instructions
==================
Before you can build Python, you must first configure it.
Fortunately, the configuration and build process has been automated
for Unix and Linux installations, so all you usually have to do is
type a few commands and sit back. There are some platforms where
things are not quite as smooth; see the platform specific notes below.
If you want to build for multiple platforms sharing the same source
tree, see the section on VPATH below.
Start by running the script "./configure", which determines your
system configuration and creates the Makefile. (It takes a minute or
two -- please be patient!) You may want to pass options to the
configure script -- see the section below on configuration options and
variables. When it's done, you are ready to run make.
To build Python, you normally type "make" in the toplevel directory.
If you have changed the configuration, the Makefile may have to be
rebuilt. In this case, you may have to run make again to correctly
build your desired target. The interpreter executable is built in the
top level directory.
To get an optimized build of Python, "configure --enable-optimizations" before
you run make. This sets the default make targets up to enable Profile Guided
Optimization (PGO) and may be used to auto-enable Link Time Optimization (LTO)
on some platforms. For more details, see the sections bellow.
Once you have built a Python interpreter, see the subsections below on
testing and installation. If you run into trouble, see the next
section.
Previous versions of Python used a manual configuration process that
involved editing the file Modules/Setup. While this file still exists
and manual configuration is still supported, it is rarely needed any
more: almost all modules are automatically built as appropriate under
guidance of the setup.py script, which is run by Make after the
interpreter has been built.
Profile Guided Optimization
---------------------------
PGO takes advantage of recent versions of the GCC or Clang compilers.
If ran, "make profile-opt" will do several steps.
First, the entire Python directory is cleaned of temporary files that
may have resulted in a previous compilation.
Then, an instrumented version of the interpreter is built, using suitable
compiler flags for each flavour. Note that this is just an intermediary
step and the binary resulted after this step is not good for real life
workloads, as it has profiling instructions embedded inside.
After this instrumented version of the interpreter is built, the Makefile
will automatically run a training workload. This is necessary in order to
profile the interpreter execution. Note also that any output, bot
评论0