10 of 12 people found the following review helpful:
5.0 out of 5 stars
A must-have for the non-expert Python programmer, June 18, 2001
This review is from: Python Standard Library (Nutshell Handbooks) with (Paperback)
If you are learning Python, a beginner to intermediate Python programmer, you'll want to get a copy of this book. It won't do as your only Python book, but as a supplement to <i>Learning Python</i> or one of the other introductory Python books, it is invaluable for the non-expert Python programmer. If you bought the first edition of the book, which was available only as an eBook, you'll want this edition as it covers Python 2.0 as well as Python 1.5.2. (The eBook edition covered only Python 1.5.2.)
Each chapter begins with a brief summary of what will be covered. Chapter 4 is summarised as follows: "This chapter describes a number of modules that can be used to convert between Python objects and other data representations. These modules are often used to read and write foreign file formats and to store or transfer Python variables." It's terse, to be sure, but it's not meant for someone who has never looked at Python before.
Frederik assumes you know which module you want to use and gives you some sample code that shows you how to use it. You might ask on a newsgroup how to parse an HTML file. Someone will answer and tell you to look at either the htmllib or sgmllib module. Great. So, umm, how do you use them? A sample script showing you how to do something with either module or both could save you hours of frustration. Frederik also gives you tips on how best to use a module or when not to use it. For example, in describing the htmllib module, he says "If you're only out to parse an HTML file and not render it to an output device, it's usually easier to use the sgmllib module instead."
The book is sprinkled with tips. Early in Chapter 1 he points out that "What you might now know already is that import delegates the actual work to a built-in function called __import__. The trick is that you can call this function directly. This can be handy if you have the module name in a string variable, which imports all modules whose names end with '-plugin'."
The books covers: core modules (eg, re, time); more standard modules (eg, file input, md5); threads and processes (eg, thread, pipes); data representation (eg, pickle, base64); file formats (eg, xmllib, zipfile); mail and news message processing (eg, rfc822, mimetypes); network protocols (eg, socket, asyncore); internationalisation (eg, unicodedata); multimedia modules (eg, wave, winsound); data storage (eg, dbhash, gdbm); tools and utilities (eg, pdb, profile); platform-specific modules (eg, pwd, nt); implementation support modules (eg, macpath, ntpath); and other modules (eg, Bastion, calendar, posixfile, regsub).
The sample code is printed in Courier and some of the samples are tracked too tightly, making it difficult to read. I assume in production they applied the same tracking values for the body text to the code text. (Tracking is the spacing between a series of characters where kerning is the space between two characters.) But that happens only occasionally.
Also included with the book is a CD which contains copies of all the scripts plus an evaluation copy of PythonWorks Pro 1.2, a Python IDE for Windows, Linux, and Solaris. (Fredrik works for Secret Labs AB who develop PythonWorks.) I was able to browse and open the sample files on MacOS X. But of course I couldn't try the evaluation copies of PythonWorks. I would rather they had dropped the CD and made the sample scripts available as a download -- it would drop a few dollars off the cost of the book. If you're an expert Python programmer you won't need this book. But if you're a beginner to intermediate Python programmer you'll find the sample code and commentary invaluable when you try to implement an unfamiliar module, particularly some of the more complex ones. And the tips sprinkled throughout the text will help you achieve mastery of this most glorious of programming languages. Highly recommended.
Help other customers find the most helpful reviews
Was this review helpful to you? Yes
No
7 of 8 people found the following review helpful:
3.0 out of 5 stars
Has been superceeded, January 25, 2006
This review is from: Python Standard Library (Nutshell Handbooks) with (Paperback)
I bought this book in 2004 when I was just starting to learn Python. I never once used it. Its not a bad book, just less useful now than in 2001.
The book covers Python 2.0. Anything before 2.2 for any Python book is probably not worth the trouble in 2006 and beyond.
When looking for information about a Python module I look in Alex Martelli's Nutshell book(2.2) and the go to the online Library Reference. The nutshell is good for background and examples and the Library Reference brings things up to 2.4.
If I am not quite sure what I am looking for then the Python Cookbook (2nd edition) is the most help.
Mark Pilgram's Dive into Python is a great, in-depth look at some of the more useful standard library modules.
I hope Alex Marelli updates his Nutsehell book for 2.4.
There are other good books for learning Python but the Nutshell(O'Reilly), Cookbook(O' Reilly), Library Reference(python.org), and Dive into Python(online or an Apress book) do the best job of covering the standard library,
Help other customers find the most helpful reviews
Was this review helpful to you? Yes
No
7 of 8 people found the following review helpful:
2.0 out of 5 stars
Please don't buy this book, June 4, 2001
By A Customer
This review is from: Python Standard Library (Nutshell Handbooks) with (Paperback)
The author knows python, but the book itself is not worth it. It just contains lots of code snippet and little explanation.
The two books that I'll recommend are "Python Essential Reference" by David M. Beazley (a second edition is coming soon) and "Core Python" by Wesley Chun.
Help other customers find the most helpful reviews
Was this review helpful to you? Yes
No