scripting—programs that run on a server computer and are usually invoked by a web
browser.
What we won’t cover
Now that I’ve told you what we will cover in this book, I also want to be clear about
what we won’t cover. Like tkinter, the Internet is a vast topic, and this part of the book
is mostly an introduction to its core concepts and an exploration of representative tasks.
Because there are so many Internet-related modules and extensions, this book does not
attempt to serve as an exhaustive survey of the domain. Even in just Python’s own tool
set, there are simply too many Internet modules to include each in this text in any sort
of useful fashion.
Moreover, higher-level tools like Django, Jython, and App Engine are very large systems
in their own right, and they are best dealt with in more focused documents. Because
dedicated books on such topics are now available, we’ll merely scratch their surfaces
here with a brief survey later in this chapter. This book also says almost nothing about
lower-level networking layers such as TCP/IP. If you’re curious about what happens
on the Internet at the bit-and-wire level, consult a good networking text for more
details.
In other words, this part is not meant to be an exhaustive reference to Internet and web
programming with Python—a topic which has evolved between prior editions of this
book, and will undoubtedly continue to do so after this one is published. Instead, the
goal of this part of the book is to serve as a tutorial introduction to the domain to help
you get started, and to provide context and examples which will help you understand
the documentation for tools you may wish to explore after mastering the fundamentals
here.
Other themes in this part of the book
Like the prior parts of the book, this one has other agendas, too. Along the way, this
part will also put to work many of the operating-system and GUI interfaces we studied
in Parts II and III (e.g., processes, threads, signals, and tkinter). We’ll also get to see
the Python language applied in realistically scaled programs, and we’ll investigate some
of the design choices and challenges that the Internet presents.
That last statement merits a few more words. Internet scripting, like GUIs, is one of
the “sexier” application domains for Python. As in GUI work, there is an intangible but
instant gratification in seeing a Python Internet program ship information all over the
world. On the other hand, by its very nature, network programming can impose speed
overheads and user interface limitations. Though it may not be a fashionable stance
these days, some applications are still better off not being deployed on the Web.
A traditional “desktop” GUI like those of Part III, for example, can combine the feature-
richness and responsiveness of client-side libraries with the power of network access.
On the other hand, web-based applications offer compelling benefits in portability and
774 | Chapter 12: Network Scripting