This appendix is a very brief introduction to some install-level details of Python use, and contains a list of Python Internet resources. More information on topics not covered fully here can be found at other resources:
For additional install details, consult the various README text files
in the examples distribution on this book’s CD (view CD-ROM content
online at http://examples.oreilly.com/python2), as well as the
README files and other documentation that accompany the Python
distributions and other packages on the CD. In particular, the README
files in the Examples
and
ExamplesPP2E
directories contain book example
tree documentation and Python install details not repeated in this
appendix.
For more background information on running Python programs in general, see the Python manuals included on this book’s CD, or the introductory-level O’Reilly text Learning Python.
For more background information on the core Python language itself, refer to the Python standard manuals included on this book’s CD, and the O’Reilly texts Learning Python and Python Pocket Reference.
For more information about all things Python, see http://www.python.org.This site has online Python documentation, interpreter downloads, search engines, and links to just about every other relevant Python site on the Web. For links to information about this book, refer back to the Preface.
This section gives an overview of install-related details -- instructions for putting the Python interpreter on your computer.
Python install details vary per platform and are described in the resources just listed. But as an overview, Windows users will find a Python self-installer executable at http://examples.oreilly.com/python2 (see the top-level Python 1.5.2 and 2.0 directories). Simply double-click the installer program and answer “yes,” “next,” or “default” to step through a default Windows install. Be sure to install Tcl/Tk too, if you are asked about it along the way.
After the install, you will find an entry for Python in your Start button’s Programs menu; it includes options for running both the IDLE integrated GUI development interface and the command-line console session, viewing Python’s standard manuals, and more. Python’s manuals are installed with the interpreter in HTML form, and open locally in a web browser when selected.
Python also registers itself to open Python files on Windows, so you
can simply click on Python scripts in a Windows file explorer window
to launch them. You can also run Python scripts by typing
python
file.py
command lines at
any DOS command-line prompt, provided that the directory containing
the python.exe
Python interpreter program is added
to your PATH DOS shell variable (see the configuration and running
sections later).
Note that the standard Python package for Windows includes full
Tkinter support. You do not need to install other packages or perform
any extra install steps to run Tkinter GUIs on Windows; simply
install Python. All necessary Tkinter components are installed by the
Python self-installer, and Python automatically finds the necessary
components without extra environment settings. The Windows install
also includes the bsddb
extension to support
DBM-style
files.
If you plan
on doing any Windows-specific work such as COM development, you will
probably want to install the extra win32all
extensions package (available at http://examples.oreilly.com/python2 as well as at
http://www.python.org). This
package registers Python for Active Scripting, provides MFC wrappers
and COM integration, and more (see Chapter 15).
Also note that Python distributions available from other sources
(e.g., the ActivePython distribution from ActiveState, http://www.activestate.com) may include both
Python and the Windows extensions package.
Python may already be
available on these platforms (it’s often installed as a
standard part of Linux these days); check your
/usr/bin
and /usr/local/bin
directories to see if a Python interpreter is lurking there. If not,
Python is generally installed on these platforms from either an
rpm
package (which installs Python executables and
libraries automatically) or the source code distribution package
(which you unpack and compile locally on your computer). Compiling
Python from its source on Linux is a trivial task -- usually just
a matter of typing two or three simple command lines. See the Python
source distribution’s top-level README files and Linux
rpm
documentation for more details.
Please see the documentation associated with the Macintosh ports for install and usage details. For other platforms, you will likely need to find ports at http://www.python.org and consult the port’s install notes or documentation.
18.117.176.38