This Edition’s Design
The best way to get a feel for any book is to read it, of course. But especially for people who are familiar with the prior edition, this section will clarify regarding what is new this time around.
It’s Been Updated for Python 2.4 (and 2.5)
All of the example code has been upgraded to use the latest
features of the Python language and its standard library. Python is
still largely compatible with the code in the first two editions, but
recent language additions such as nested scopes and list
comprehensions simplify many coding tasks. For instance, default
arguments are no longer required to pass objects into most lambda
expressions, and the new email
package greatly simplifies the tasks of parsing and adding email
attachments. See the Python changes list earlier in this chapter for
more on this subject.
Although the GUI examples in this book required almost no code changes, they have been updated to run on Tk 8.4, the library used by Python 2.4 as its standard portable GUI toolkit. Among other things, the latest Tk allows window icons to be set by the program. Although begun under 2.4, this edition is also compatible with the upcoming Python 2.5 release.
It’s Been Reorganized
A few chapters have been moved to make the flow more logical; for example, the sections on files and directories and the PyMailGUI example are now in chapters of their own. In addition, all appendixes were cut (this book is neither a reference nor a Python changes log), and a new initial preview ...