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 available in HTML, PostScript, PDF, and
LaTeX formats; the LaTeX version is primarily for documentation
authors, translators, and people with special formatting requirements.
Unfortunately, new-style classes (new in Python 2.2) have not yet been
integrated into Python's standard documentation. A collection of
pointers to what has been written is at:
http://www.python.org/doc/newstyle.html
Web sites
---------
New Python releases and related technologies are published at
http://www.python.org/. Come visit us!
There's also a Python community web site at
http://starship.python.net/.
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.html 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.html for details.
Bug reports
-----------
To report or search for bugs, please use the Python Bug
Tracker at http://sourceforge.net/bugs/?group_id=5470.
Patches and contributions
-------------------------
To submit a patch or other contribution, please use the Python Patch
Manager at http://sourceforge.net/patch/?group_id=5470. Guidelines
for patch submission may be found at http://www.python.org/patches/.
If you have a proposal to change Python, it's best to submit a Python
Enhancement Proposal (PEP) first. All current PEPs, as well as
guidelines for submitting a new PEP, are listed at
http://www.python.org/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.
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.
Troubleshooting
---------------
See also the platform specific notes in the next section.
If you run into other trouble, see the FAQ
(http://www.python.org/doc/faq) for hints on what can go wrong, and
how to fix it.
If you rerun the configure script with different options, remove all
object files by running "make clean" before rebuilding. Believe it or
not, "make clean" sometimes helps to clean up other inexplicable
problems as well. Try it before sending in a bug report!
If the configure script fails or doesn't seem to find things that
should be there, inspect the config.log file.
If you get a warning for every file about the -Olimit option being no
longer supported, you can ignore it. There's no foolproof way to know
whether this option is needed; all we can do is test whether it is
accepted without error. On some systems, e.g. older SGI compilers, it
is essential for performance (specifically when compiling ceval.c,
which has more basic blocks than the default limit of 1000). If the
warning bothers you, edit the Makefile to remove "-Olimit 1500" from
the OPT variable.
If you get failures in test_long, or sys.maxint gets set to -1, you
are probably experiencing compiler bugs, usually related to
optimization. This is a common problem with some versions of gcc, and
some vendor-supplied compilers, which can sometimes be worked around
by turning off optimization. Consider switching to stable versions
(gcc 2.95.2, gcc 3.x, or contact your vendor.)
From Python 2.0 onward, all Python C code is ANSI C. Compiling using
old K&R-C-only compilers is no longer possible. ANSI C compilers are
available for all modern systems, either in the form of updated
compilers from the vendor, or one of the free compilers (gcc).
Unsupported systems
-------------------
A number of features are not supported in Python 2.5 anymore. Some
support code is still present, but will be removed in Python 2.6.
If you still need to use current Python versions on these systems,
please send a message to python-dev@python.org indicating that you
volunteer to support this system. For a more detailed discussion
regarding no-longer-supported and resupporting platforms, as well
as a list of platforms that became or will be unsupported, see PEP 11.
More specifically, the following systems are not supported any
longer:
- SunOS 4
- DYNIX
- dgux
- Minix
- NeXT
- Irix 4 and --with-sgi-dl
- Linux 1
- Systems defining __d6_pthread_create (configure.in)
- Systems defining PY_PTHREAD_D4, PY_PTHREAD_D6,
or PY_PTHREAD_D7 in thread_pthread.h
- Systems using --with-dl-dld
- Systems using --without-universal-newlines
- MacOS 9
from https://github.com/guyao/python-cobra/tree/master/cobraserver
No comments:
Post a Comment