Python Cookbook, by Alex Martelli and David Ascher, O'Reilly, 2002,
This is a most excellent book.
There are numerous code examples in each of 17 different categories. These
code examples are useful, interesting, and educational. The discussions of
each code example are what makes this book so valuable. The discussions are
written by some of the most knowledgable and articulate members of the Python
community, and they are well written, illuminating, and often subtly witty.
Each of the 17 chapters has an introduction written by one of these brilliant
Pythonic personalities. In my opinion, these 17 introductions are well worth
far more than the price of the book (about $39.95) all by themselves. These
contributors include such luminaries as Guido van Rossum, Tim Peters, Alex
Martelli, David Ascher, Fredrik Lundh, Fred Drake, Mark Lutz, Mark Hammond,
David Beazley, and the remarkable unknown coder, the pseudonymous
Luther Blissett, among many others.
The book includes code examples easy enough for the novice to appreciate,
and erudite advanced examples that will add to the knowledge of the hoary
veteran programmer, and all points in between. Whatever the level of sophistication
of the code, it is the lucid explications given by the expert coders
that make this book so excellent.
The 17 topic areas are Python Shortcuts, Searching and Sorting, Text, Files,
Object Oriented Programming, Threads Processes and Synchronization,
System Administration, Databases and Persistence, User Interfaces, Network
Programming, Web Programming, Processing XML, Distributed Programming, Debugging
and Testing, Programs about Programs, Extending and Embedding, and Algorithms.
The book rises above its genre to become a work of art, of high literature,
a classic of Philosophy. Are not all the great works of Philosophy firmly
grounded in some particular area of knowledge? When the Particular is examined
with sufficient clarity, it is able to illuminate the General Principles.
Concrete expertise is abstracted by the genius of induction into the Sublime.
This book is one I will cherish for many years, coming back to it often.
It is meant to be savored, not devoured. It is a classic. It will long grace
my bookshelf along side Aristotle, Eco, and Joyce.
And yet it is an eminently practical, down to earth, useable tool for learning
to program better in Python, or in any language.
Buy this book.