Before you start
Python is a popular object-oriented scripting language with a simple syntax and a large developer base. It is a general purpose language and can be used in a variety of settings. It's also popular as a beginner's programming language, much like the BASIC language of the 1970s.
This tutorial demonstrates the Python language with emphasis on networking programming. I define the basic sockets features of Python in addition to some of Python's other classes that provide asynchronous sockets. I also detail Python's application-layer protocol classes, showing how to build Web clients, mail servers and clients, and more.
I also demonstrate a simple chat server to illustrate the power of Python for sockets applications.
You should have a basic understanding of the standard BSD Sockets API and some experience with the GNU/Linux® environment. Some familiarity with object-oriented concepts is also beneficial.
This tutorial and the examples demonstrated in it rely on version 2.4 of Python. You can
download this version from the Python Web site (see Resources for a link). To
build the Python interpreter, you need the GNU C compiler (gcc) and the
utilities (which are part of any standard GNU/Linux distribution).
You should have a basic understanding of the standard BSD Sockets API and some experience with the GNU/Linux environment. Some familiarity with object-oriented concepts is also beneficial.