TechBookReport logo



Keywords: Python, MySQL

Title: Python Phrasebook

Author: Brad Dayley

Publisher: SAMS Publishing

ISBN: 0672329107

Media: Book

Level: Introductory

Verdict: Useful for beginning or occasional Python programmers

 

In spoken languages a good phrase book is invaluable to those who aren't yet fluent. They provide complete and useable chunks of speech (sentences and phrases) organised thematically - how to order a meal, how to find your way around. As with spoken languages so it can be for programming languages, with this Python Phrasebook, by Brad Dayley, as a good example.

The phrases in this context are snippets of Python code that accomplish specific and well-defined tasks. Some of the phrases are only a few lines of code, some are longer but none of them stretches for pages on end. What's more each phrase comes with some explanatory text that explains what's going on and why. This makes the book an ideal place to dip in for some cut and paste code - it can function like a cookbook as well as a phrasebook.

As with some of the better phrasebooks for spoken languages, this one does not assume a huge amount of prior knowledge (after all, if you are already a Python guru why would you need this book?). The opening section of the book provides some guidance in the form of a fast introduction to the language for those who either don't know it at all or who need some reminding. For the complete beginner it doesn't work as well as a complete tutorial, certainly it's no replacement for Mark Pilgrim's 'Dive Into Python' or the 'Learning Python', but as a quick refresher it's more than adequate.

The book is organised into thematic chapters, including string handling, data types (lists, tuples and dictionaries), file handling, threading, databases (including DBM, pickling, shelving and MySQL), internet comms (sockets, SMTP, POP and FTP), HTML processing, XML processing and finally web services. All in all a fairly comprehensive list of topics to chose from. Within in each of those chapters the individual phrases are task oriented and practical rather than being designed to teach this or that aspect of the Python language.

For a practical source-book of ideas and code samples this covers a lot of ground and is ideal for the relative new-comer to Python. It works well as an additional resource next to a fully-fledged primer or detailed tutorial. Even better, for those of us who only use Python occasionally to glue things together or to knock up a quick hack, this is a great place to come to for ideas.


Hit the 'back' key in your browser to return to subject index page

Return to home page

Contents © TechBookReport 2006. Published December 6 2006