Using the Book’s Examples
Because examples are central to the structure of this book, I want to briefly describe how to use them here. In general, though, see the following text files in the examples directory for more details:
- README-root.txt
Package structure notes
- PP3E\README-PP3E.txt
General usage notes
Of these, the README-PP3E.txt file is the most informative. In addition, the PP3E\Config directory contains low-level configuration file examples for Windows and Linux, which may or may not be applicable to your usage. I give an overview of some setup details here, but the preceding files give the complete description.
The Book Examples Tree
In a sense, the directory containing the book’s examples is itself a fairly sophisticated Python software system and the examples within it have been upgraded structurally in a number of important ways:
- Examples directory tree: a package
The entire examples distribution has been organized as one Python module package to facilitate cross-directory imports and avoid name clashes with other Python code installed on your computer. All cross-directory imports in book examples are package imports, relative to the examples root directory.
Using directory paths in import statements (instead of a complex
PYTHONPATH) also tends to make it easier to tell where modules come from. Moreover, you now need to add only one directory to yourPYTHONPATHsearch-path setting for the entire book examples tree: the directory containing the PP3E examples root directory. ...
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.
Read now
Unlock full access