Click for table of contents


Programming Python, 2nd Edition

Mark Lutz

Publisher: O'Reilly

2nd Edition March 2001
ISBN: 0-596-00085-5, 1256 pages

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 (view CD-ROM content online at has book examples and various Python-related packages, including the full Python Version 2.0 source code distribution.


1. Introducing Python

I: System Interfaces
2. System Tools
3. Parallel System Tools
4. Larger System Examples I
5. Larger System Examples II

II: GUI Programming
6. Graphical User Interfaces
7. A Tkinter Tour, Part 1
8. A Tkinter Tour, Part 2
9. Larger GUI Examples

III: Internet Scripting

11. Client-Side Scripting
12. Server-Side Scripting
13. Larger Web Site Examples I
14. Larger Web Site Examples II
15. Advanced Internet Topics

IV: Assorted Topics
16. Databases and Persistence
17. Data Structures
18. Text and Language

V: Integration
19. Extending Python
20. Embedding Python

VI: The End
21. Conclusion: Python and the Development Cycle

A. Recent Python Changes
B. Pragmatics
C. Python Versus C++



About the Author

Mark Lutz is a Python trainer, writer, and software developer, and one of the primary figures in the Python community. He is the author of Programming Python and Python Pocket Reference, and coauthor of Learning Python. Mark has been involved with Python since 1992 and began teaching Python classes in 1997. In addition, he holds B.S. and M.S. degrees in computer science from the University of Wisconsin, and has worked on compilers, programming tools, scripting applications, and assorted client/server systems. Mark can be reached by email at, or on the web at

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.

Copyright © 2001 O'Reilly & Associates, Inc. All rights reserved.

Printed in the United States of America.

Published by O'Reilly & Associates, Inc., 101 Morris Street, Sebastopol, CA 95472.

Nutshell Handbook, the Nutshell Handbook logo, and the O'Reilly logo are registered trademarks of O'Reilly & Associates, Inc. Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and O'Reilly & Associates, Inc. was aware of a trademark claim, the designations have been printed in caps or initial caps. The association between the image of an African rock python and the topic of Python programming is a trademark of O'Reilly & Associates, Inc.

While every precaution has been taken in the preparation of this book, the publisher assumes no responsibility for errors or omissions, or for damages resulting from the use of the information contained herein.