Internet Programming with Python
Authors: Aaron Watters, Guido van Rossum, James C. Ahlstrom
Publisher: M&T Books
Reviewer: Dwight Johnson
Internet Programming with Python is a book to teach Python programming to intermediate and advanced programmers.
Authors Watters, van Rossum and Ahlstrom are well qualified to write about their subject: van Rossum is the primary author of the Python language; Watters works for AT&T Laboratories on exploratory Internet applications; Ahlstrom is the original author of the WPY/Python GUI package. All three authors can be found actively contributing to the Python mailing list and the comp.lang.python newsgroup.
Chapter One briefly describes the strengths and weaknesses of Python. As Python is a dynamically typed, object oriented, general purpose language built from a small number of constructs, it is both powerful and easy to learn and use. Because it is interpreted, it is suitable for rapid prototyping and program development. Because it easily incorporates modules written in other languages, it is an excellent glue language for the overall structure of large programming projects. Python is not suitable for programming algorithms which require very rapid or time critical execution such as data compression, device drivers, complex floating point calculations or complex database operations.
Chapter Two gives a birds-eye view of Python and Chapter Three is a fun and humorous hands-on tutorial which gives the reader some experience working with actual Python constructs and code.
Chapters Four, Five and Six present the Python language in a more formal and systematic way. The authors recommend these chapters for later reference rather than for detailed reading. Although these chapters are quite complete, they are not intended to replace the reference manual that comes with the Python distribution.
To illustrate the virtues of programming in Python, Chapters Seven, Eight and Nine introduce three of the most abstruse applications of Internet programming—the dynamic generation of HTML documents, CGI programming, and programming Internet protocols—and show how Python easily and elegantly deals with the programming issues involved.
The authors are teachers at heart and take pains to briefly and lucidly explain each of these applications before delving into their Python solutions—solutions which illustrate and justify some of Python's most powerful features: multiple inheritance, dynamic attribute access, dynamic keyword arguments and use of the extensive Python tools, libraries, modules and demos that come with the Python distribution.
Python's object-oriented features make it a convenient language for implementing a graphical user interface. Chapter Ten introduces Tkinter and WPY, two class libraries developed for that purpose, and goes on to use WPY to develop a very interesting HTML viewer application that could very easily be enhanced to become a simple web browser.
Chapter Eleven is an introduction to writing C language extensions which can be used to add new basic functionality to Python. According to the authors, “Extending Python is easy, so easy in fact that playing with Python extensions might be an excellent way to learn the C programming language...” They illustrate extending Python with an example called BStream that has the practical application of conveniently manipulating large images.
Python can be embedded as a component of another main program. As an example, Chapter Twelve shows how to embed Python under any Netscape HTTP Server product that supports the NSAPI server component API. This might be useful to provide dynamic CGI server functionality to a web server without the overhead of running separate CGI processes for each request.
Appendices give a brief guide to the Python standard libraries and a very useful tutorial on regular expressions.
Internet Programming with Python comes with a handy CD-ROM which includes the complete 1.3 and 1.4b2 versions of Python as well as source code for all the Python examples given in the book. Executable versions are included for DOS, Windows 3.1, 95 and NT, Macintosh and all of the popular Unix platforms, including Linux.
Overall, Internet Programming with Python is an outstanding read. The discursive portions of the book alone, in sections such as “How CGI Works,” are well worth the effort.
Authors Watters, van Rossum and Ahlstrom write with wit and wisdom. They demonstrate a genuine knack for making complex subjects easy. They gently introduce the reader to the nuts and bolts of the Python language. At the same time, they consistently stay with their secondary theme by drawing all of their examples from Internet programming. And they clearly explain the application of Internet programming as they go.
The single negative is that there are a disturbingly large number of errors in the text and examples. Corrections to these have been published on the Python web site at http://www.python.org/. I strongly urge any reader who is not an experienced programmer to get and apply these corrections before reading the book.
With that single caveat, anyone interested in programming should read Internet Programming with Python.
As Internet Programming with Python amply proves, Python is a general purpose programming language which, because of its advanced features, easy extensibility and ability to incorporate modules from other programming languages, is an ideal first programming language that will greatly simplify and accelerate the development of many applications of arbitrary complexity.
After reading only the first three chapters, the reader will begin to understand why Python is rapidly becoming the language of choice for many programmers.
As Python is included in most Linux distributions, and some, such as Red Hat, make extensive use of Python in the systems administration tools they provide, Internet Programming with Python should be on the bookshelf of every Linux user.
Dwight Johnson (email@example.com) is a computer consultant living among the farms of the Sequim-Dungeness valley in the shadows of the Olympic Mountains in Washington State. He has been programming since 1967. He wrote this review in Applixware 4.3 on Red Hat Linux 4.2.
|Making Linux and Android Get Along (It's Not as Hard as It Sounds)||May 16, 2013|
|Drupal Is a Framework: Why Everyone Needs to Understand This||May 15, 2013|
|Home, My Backup Data Center||May 13, 2013|
|Non-Linux FOSS: Seashore||May 10, 2013|
|Trying to Tame the Tablet||May 08, 2013|
|Dart: a New Web Programming Experience||May 07, 2013|
- RSS Feeds
- Making Linux and Android Get Along (It's Not as Hard as It Sounds)
- New Products
- Drupal Is a Framework: Why Everyone Needs to Understand This
- A Topic for Discussion - Open Source Feature-Richness?
- Home, My Backup Data Center
- Validate an E-Mail Address with PHP, the Right Way
- New Products
- Developer Poll
- Tech Tip: Really Simple HTTP Server with Python
- not living upto the mobile revolution
2 hours 10 min ago
- Deceptive Advertising and
2 hours 45 min ago
- Let\'s declare that you have
2 hours 46 min ago
- Alterations in Contest Due
2 hours 47 min ago
- At a numbers mindset, your
2 hours 48 min ago
- Do not get Just Almost any
2 hours 52 min ago
- A fantastic rule-of-thumb to
2 hours 53 min ago
- Keren mastah..
3 hours 51 min ago
- mini tablet compare
5 hours 10 min ago
- Looking Good
8 hours 43 min ago
Enter to Win an Adafruit Prototyping Pi Plate Kit for Raspberry Pi
It's Raspberry Pi month at Linux Journal. Each week in May, Adafruit will be giving away a Pi-related prize to a lucky, randomly drawn LJ reader. Winners will be announced weekly.
Fill out the fields below to enter to win this week's prize-- a Prototyping Pi Plate Kit for Raspberry Pi.
Congratulations to our winners so far:
- 5-8-13, Pi Starter Pack: Jack Davis
- 5-15-13, Pi Model B 512MB RAM: Patrick Dunn
- Next winner announced on 5-21-13!
Free Webinar: Linux Backup and Recovery
Most companies incorporate backup procedures for critical data, which can be restored quickly if a loss occurs. However, fewer companies are prepared for catastrophic system failures, in which they lose all data, the entire operating system, applications, settings, patches and more, reducing their system(s) to “bare metal.” After all, before data can be restored to a system, there must be a system to restore it to.
In this one hour webinar, learn how to enhance your existing backup strategies for better disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible bare-metal recovery solution for UNIX and Linux systems.