Chapter 7. System Administration
Introduction
Credit: Donn Cave, University of Washington
In this chapter, we consider a class of programmer—the humble system administrator—in contrast to every other chapter’s focus on a functional domain. As a programmer, the system administrator faces most of the same problems that other programmers face, and should find the rest of this book of at least equal interest.
Python’s advantages in this domain are also quite familiar to any other Python programmer, but its competition is different. On Unix platforms, at any rate, the landscape is dominated by a handful of lightweight languages such as the Bourne shell and awk that aren’t exactly made obsolete by Python. These little languages can often support a simpler, clearer, and more efficient solution than Python. But Python can do things these languages can’t, and it’s often more robust in the face of things such as unusually large data inputs. Of course, another notable competitor, especially on Unix systems, is Perl (which isn’t really a little language).
One thing that stands out in this chapter’s
solutions is the
wrapper: the
alternative, programmed interface to a software system. On Unix, this
is usually a fairly prosaic matter of diversion and analysis of text
I/O. Python has recently improved its support in this area with the
addition of C-level pseudotty functions, and it would be
interesting to see more programmers experiment with them (see the
pty module). The pseudotty device is like ...