BUY THIS BOOK

Safari Books Online

What is this?

Looking to Reprint this content?

Programming Python, Second Edition Object-Oriented Scripting

By Mark Lutz
March 2001
Pages: 1296
ISBN 10: 0-596-00085-5 | ISBN 13: 9780596000851
starstarstarstarstar (Average of 7 Customer Reviews)

This book has been updated—the edition you're requesting is OUT OF PRINT. Please visit the catalog page of the latest edition.

The latest edition is also available on Safari Books Online.

Book description

Programming Python focuses on advanced applications of Python. Endorsed by Python creator Guido van Rossum, it demonstrates advanced Python techniques, and addresses software design issues such as reusability and object-oriented programming. The enclosed platform-neutral CD-ROM has book examples and various Python-related packages, including the full Python Version 2.0 source code distribution.
Full Description

Programming Python focuses on advanced uses of the Python programming/scripting language, which has evolved from an emerging language of interest primarily to pioneers, to a widely accepted tool that traditional programmers use for real day-to-day development tasks. With Python, you can do almost anything you can do with C++; but Python is an interpreted language designed for rapid application development and deployment. Among other things, Python supports object-oriented programming; a remarkably simple, readable, and maintainable syntax; integration with C components; and a vast collection of pre-coded interfaces and utilities. As Python has grown to embrace developers on a number of different platforms (Unix, Linux, Windows, Mac), companies have taken notice and are adopting Python for their products. It has shown up animating the latest Star Wars movie, serving up maps and directories on the Internet, guiding users through Linux installations, testing chips and boards, managing Internet discussion forums, scripting online games, and even scripting wireless products. Programming Python is the most comprehensive resource for advanced Python programmers available today. Reviewed and endorsed by Python creator Guido van Rossum, who also provides the foreword, this book zeroes in on real-world Python applications. It's been updated for Python 2.0 and covers Internet scripting, systems programming, Tkinter GUIs, C integration domains, and new Python tools and applications. Among them: IDLE, JYthon, Active Scripting and COM extensions, Zope, PSP server pages, restricted execution mode, the HTMLgen and SWIG code generators, thread support, CGI and Internet protocol modules. Such applications are the heart and soul of this second edition. Veteran O'Reilly author Mark Lutz has included a platform-neutral CD-ROM with book examples and various Python-related packages, including the full Python 2.0 source code distribution.
Post-purchase benefits:

Register your book | Submit Errata | Author Interview | Author's Web site | Examples


Browse within this book

Cover | Table of Contents | Index | Sample Chapter | Colophon

Book details

Second Edition: March 2001
ISBN: 0-596-00085-5
Pages: 1296
Average Customer Reviews: starstarstarstarstar (Based on 7 Reviews)


Featured customer reviews

Write a Review


unimpressed,  July 27 2006
Rating: StarStarStarStarStar
Submitted by msoulier   [Respond | View]

I was looking for the Python version of the Camel book for Perl, and this book compared horribly. The author attempts a practical approach of advancing on the same tired project again and again, boring me to the point of being unable to keep my eyes open for the next page. Meanwhile, attempting to use it later as a reference of concepts is next to impossible due to the narrative nature of the book.

The Camel book, it wasn't. I was far better off with the free online Python books.


The definitive guide to python,  June 02 2005
Rating: StarStarStarStarStar
Submitted by EvilGuru   [Respond | View]

This has to be one of the best Python books around, while it is a good few years old now 99% of the information is still relevant. This book is not for the Python newcommer, it assumes that the read does have some knowledge on Python (take a look at Learning Python if you want to learn Python). There are a huge number of examples and discussion on many aspects of Python, a must have even if the index is bad and it could do with a 3rd revision sometime.


Programming Python, 2nd Edition Review,  January 22 2003
Rating: StarStarStarStarStar
Submitted by Aki Niimura   [Respond | View]

Although this book contains some information which is not found in

other Python books, I'm not so happy about the contents.

I found very difficult to locate the specific information I needed.

Maybe O'reilly should provide a search engine specifically for their

published books. (search only within the specified book)

Second, the book is a collection of Python programs. I value books which

have a strong consistent theme.

However, this book might be valuable if a comprehensive search becomes

available.



Read all reviews


Programming Python, 2nd Edition Review,  July 13 2002
Rating: StarStarStarStarStar
Submitted by Dominic Fox   [Respond | View]



This is a great book to have around, not as a reference but as a routemap for getting around various programming domains "the Python way". The most apt comparison I can think of is with Programming Perl, another great travel guide which is similarly frustrating if what you really want is a) to learn the language from scratch, or b) to look up some particular module or language feature. Programming Python should be seen primarily as an expository text: an extended gloss on the meaning of the word "Pythonic", and a boon and helpmeet to the working programmer who wants to use Python now to do stuff.


Programming Python, 2nd Edition Review,  June 12 2001
Rating: StarStarStarStarStar
Submitted by Joakim Hove   [Respond | View]

This book was a great disappointment to me. My major gripes with the book

are:



  1. Very windows centric, spesific platform issues could have been

    handled isolated in one chapter.

  2. Extremely "wordy" - the page count could have

    been cut down to the half without reducing actual content. Most of the

    examples are introduced in an incremental fashion, with several different

    script version accomplishing approximately the same thing, all printed with

    source code and full display of user interaction.

  3. The index is close to useless. There is no way

    to find an example demonstrating a particular Python feature by looking up

    a keyword in the index.

  4. There is no explanation of Python concepts, only examples,

    examples, examples and examples ... In my opinion the point of examples is

    to demonstrate a concept - however in this book the examples seem to be the

    most important in their own right.

  5. The chapters give only a very vague indication of which python

    concepts will be covered - or what would you expect to find in the chapters

    called Larger system examples I and Larger system examples

    II
    ?.



      Maybe the problem for me is that the book was something completely

      different from what I expected. A more suitable title than "Programming

      Python" would have been "Python Examples", "Problem solving using Python"

      or something like that.

      Instead of bying this book I would recommend "Learning Python" by the same

      author, which is a really good book.




Programming Python, 2nd Edition Review,  April 27 2001
Rating: StarStarStarStarStar
Submitted by Bob Tribit   [Respond | View]

The text is littered with many great examples ranging from GUI applications to embedding Python in C/C++ apps. In fact, so far it is one of the most authoritative sources on embedding and extending Python I have seen other than the Python source itself.

However, if you are looking for info on the basics of the language (i.e. control structures, syntax, etc.) forget about it. Get "Learning Python" instead, and keep "Programming Python" around for the real world meaty examples "Learning Python" lacks. Simply put don't assume this is the Python version of "Programming Perl", this is more along the lines of an "Advanced Python Programming" and a "Python Cookbook" text wrapped into one.


Programming Python, 2nd Edition Review,  March 30 2001
Rating: StarStarStarStarStar
Submitted by Todd Warner   [Respond | View]

I really like this book. Let's start with that. Great examples, wonderfully written.

Two comments:

o Don't think of this as a reference and you'll do fine.

o Buy a learning book or whatnot if new to Python.

One BIG gripe:

o The index is really, really bad. Not comprehensive at all.

If not for the grip I would have given this at least 4 stars.




Media reviews

"The megawork, 'Programming Python, 2nd Edition,' by Lutz, which at more than 1,000 pages, is not only an impressive achievement but also will teach some really hard-core Python programming techniques."
--Mark Gibbs, "Network World," July 21, 2003

"If the language had manuals, they would undoubtedly be the texts from O'Reilly & Associates...'Learning Python' and 'Programming Python' are definitive treatments."--Andrew Binstock, SD Times, May 15, 2003
http://www.sdtimes.com/cols/middlewatch.htm

"At almost 1300 pages my back would have been a lot happier if O'Reilly & Associates had published it in two parts. On the positive, everything in it is very useful....about as comprehensive as any book can be. If you want to build a full-scale application in Python, and don't want to reinvent any wheels, this book is worth the hernia"
--Gregory V. Wilson, Dr Dobbs Journal, March 2002

"All in all, it's probably worth breaking out the wallet and paying for an upgrade. Both novice and experienced Python programmers will get a lot out of it as it's to Python as the Camel book is to Perl. You might not read all of it but it's certainly better to have it than not."
--Jules Allen, Tampa Bay Perl Mongers, August 2001

"The author touches on such a wide variety of projects that you're practically guaranteed to find something relevant to what you want to work on at any given time, but precisely because there's so much meat in this book, it strikes me as the type of resource that you'll grow into as you mature in the language."
--Brian Donovan, evolt.org, July 2001

"'Programming Python' is a cracking read to boot. A definite Python philosophy oozes from every page and it's certainly infectious. An in keeping with Python's origin, there's plenty of humour here with a good scattering of amusing anecdotes and witty Python jargon. Above all Programming Python is the very model of a coding tutorial which lays an excellent emphasis on learning though playing, experience and example."
--Linux User, June 2001

"This book is a work of art. I have read all 1255 pages and yet still I come back to them and treasure them. I did not read the book straight through; rather I read large sections at a time, but out of order, going where my interests took me. But the book is meant to be read straight through, and is written well enough to maintain interest when read in that manner. Printed on high quality paper with a beautiful and sturdy binding, this book will be a well-worn reference book in my library ten years from now."
--Ron Stephens, Python City

"I recommend you pick up 'Programming Python' by Mark Lutz, form the O'Reilly series, now in its second printing."
--Nicholas Petreley, Infoworld, May 21, 2001

"An excellent compendium of material geared toward the more knowledgeable Python developer. It includes dozens of reusable scripts for common scripting tasks, and is one of the best available sources of information for this popular object-oriented scripting language. In over 1,200 pages of material, this book offers an extremely comprehensive guide to Python development. Though his book is densely packed with information, Mark Lutz is a lively and witty writer whose focus is on getting things done using the natural strengths of the Python language. .Not only will this book teach you more about Python, but it will also give you a library of code that you can use as is or adapt for your own projects... There aren't many titles on Python, and fans of this up-and-coming language are lucky to have such a solid tutorial and guide available in Programming Python. Perfect for those with just a little previous exposure to the language, it's all you need to master Python in-depth and tap its considerable power for virtually any software project."
--Richard Dragan, amazon.com, April 2001

"The godfather of Python books is Mark Lutz' 'Programming Python'. I am not certain if it was the first book published on Python, but for several years it was the standard to which users were referred. 'Programming Python' is a fairly ambitious project. It is one of those 900 page computer references one finds in stores, but without the fluff and filler of many such tomes."
--David Mertz, Ph.D., IBM Developer works, Feb 2001

"The best reference on the Python language."
--Suzanne A. Smith, San Diego Union-Tribune, June 8, 1999

"Practical and full of examples you'll use . . ."
--Freelance Informer, April 30, 1999

"I hope that 'Programming Python' will help win Python many new converts. Like most O'Reilly & Associates books, it is well written, superbly edited, and informative. Lutz introduces the Python language and its major libraries (of which there are many), and shows how to embed Python in C and vice versa. There are many example programs, all clearly explained, and a CD-ROM with the whole Python release for Windows, Macintosh, and UNIX."
--Dr. Dobbs, November 1997

"For anyone interested in the Python language this book is the best thing around. It may not be the best tutorial from which to learn the language, but any serious programmer will find the book invaluable. Although 'Programming Python' is an excellent book supporting an excellent language, that language may be regulated to a niche player. But if you want an alternative to Java, Python is a good choice, and this book is the perfect starting point."
--Terry Rooker, ;login:, April 1998

"Despite the predictable reptile on its cover, 'Programming Python'is not at all snake-like. It is, rather, a friendly, welcoming, bear-like book. Lutz begins with a 'teaser' chapter, which shows off Python's features--for those familiar with the language a taste of things to come; for newcomers a glimpse of its power and flexibility. This is followed by instructions on obtaining and installing Python (which is on the accompanying CD-ROM, along with lots of other goodies). Part two works its way through the language, from the most basic features through to object-oriented programming. This is done through the construction first of some simple shell tools and then of an increasingly sophisticated menu system (all the examples are on the CD-ROM). The overall approach is not very systematic (boxes are used for side-trips and digressions), but the result is pretty comprehensive. I often find overly discursive explanations annoying, but that wasn't the case here. Lutz is continually provides new information and doesn't repeat himself, and I found myself learning even in sections I expected to be uninteresting. Part three deals with advanced topics, applications of Python and its interaction with other systems. I read the chapters on persistent information, implementing objects (stacks, sets, and other data structures), and language and text processing. Other chapters cover graphical user interfaces (tk), extending Python in C, and embedding Python. There is also a brief look at Python's place in the software development cycle. "Though an introductory tutorial is included as an appendix, 'Programming Python' is not aimed at the newcomer to programming (and there is room for another book here, since Python would make a great teaching language). Nor, though a technical reference is provided as an appendix, is it particularly useful as a reference--but then the online documentation for Python is pretty good. 'Programming Python' is more a 'tour' of the language.

"If you are approaching Python from experience with other languages, then I recommend reading chapter two in the bookshop (and possibly the final section on the development cycle). That should give you enough of an idea of Python's features and Lutz's style to decide if Python and
'Programming Python' are for you. Those already using Python are, unless they are real wizards, sure to learn something new from 'Programming Python',if not about language features, then about the idiom and ethos of the language."

Copyright (c) 1997 Danny Yee (danny@cs.su.oz.au) http://www.anatomy.su.oz.au/danny/book-reviews/

Disclaimer: I requested and received a review copy of Programming Python from O'Reilly & Associates, but I have no stake, financial or otherwise, in its success.

Hide extended reviews


See larger cover