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 (firstname.lastname@example.org) 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.
Practical Task Scheduling Deployment
July 20, 2016 12:00 pm CDT
One of the best things about the UNIX environment (aside from being stable and efficient) is the vast array of software tools available to help you do your job. Traditionally, a UNIX tool does only one thing, but does that one thing very well. For example, grep is very easy to use and can search vast amounts of data quickly. The find tool can find a particular file or files based on all kinds of criteria. It's pretty easy to string these tools together to build even more powerful tools, such as a tool that finds all of the .log files in the /home directory and searches each one for a particular entry. This erector-set mentality allows UNIX system administrators to seem to always have the right tool for the job.
Cron traditionally has been considered another such a tool for job scheduling, but is it enough? This webinar considers that very question. The first part builds on a previous Geek Guide, Beyond Cron, and briefly describes how to know when it might be time to consider upgrading your job scheduling infrastructure. The second part presents an actual planning and implementation framework.
Join Linux Journal's Mike Diehl and Pat Cameron of Help Systems.
Free to Linux Journal readers.Register Now!
- Murat Yener and Onur Dundar's Expert Android Studio (Wrox)
- SUSE LLC's SUSE Manager
- My +1 Sword of Productivity
- Tech Tip: Really Simple HTTP Server with Python
- Non-Linux FOSS: Caffeine!
- Managing Linux Using Puppet
- Google's SwiftShader Released
- Parsing an RSS News Feed with a Bash Script
- Doing for User Space What We Did for Kernel Space
- SuperTuxKart 0.9.2 Released
With all the industry talk about the benefits of Linux on Power and all the performance advantages offered by its open architecture, you may be considering a move in that direction. If you are thinking about analytics, big data and cloud computing, you would be right to evaluate Power. The idea of using commodity x86 hardware and replacing it every three years is an outdated cost model. It doesn’t consider the total cost of ownership, and it doesn’t consider the advantage of real processing power, high-availability and multithreading like a demon.
This ebook takes a look at some of the practical applications of the Linux on Power platform and ways you might bring all the performance power of this open architecture to bear for your organization. There are no smoke and mirrors here—just hard, cold, empirical evidence provided by independent sources. I also consider some innovative ways Linux on Power will be used in the future.Get the Guide