Skip to Main Content
Programming Python, Second Edition
book

Programming Python, Second Edition

by Mark Lutz
March 2001
Intermediate to advanced content levelIntermediate to advanced
1296 pages
38h 8m
English
O'Reilly Media, Inc.
Content preview from Programming Python, Second Edition

Book Examples Distribution

This section briefly discusses the book’s example source code distribution, and covers example usage details.

The Book Examples Package

The Examples\PP2E CD directory is a Python module package that contains source code files for all examples presented in this book (and more). The PP2E package in turn contains nested module packages that partition the example files into subdirectories by topic. You can either run files straight off the CD, or copy the PP2E directory onto your machine’s hard drive (copying over allows you to change the files, and lets Python store their compiled bytecode for faster startups).

Either way, the directory that contains the PP2E root must generally be listed on the Python module search path (normally, the PYTHONPATH environment variable). This is the only entry that you must add to the Python path, though; import statements in book examples are always package import paths relative to the PP2E root directory unless the imported module lives in the same directory as the importer.

Also in the examples package, you’ll find scripts for converting example files’ line-feeds to and from Unix format (they are in DOS format on the CD--see http://examples.oreilly.com/python2), making files writable (useful after a drag-and-drop on Windows), and more. See the README files at the top of the Examples and PP2E directory trees for more details on package tree usage and utilities.

Running the Demo Launcher Scripts

The top level of the ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Programming Python, 3rd Edition

Programming Python, 3rd Edition

Mark Lutz

Publisher Resources

ISBN: 0596000855Supplemental ContentCatalog PageErrata