Chapter 16. Network Programming

For more than a decade at the time this book is being written, one of the main reasons driving the purchase of personal computers is the desire to get online: to connect in various ways to other computers throughout the world. Network connectivity — specifically, Internet connectivity — is the "killer app" for personal computing, the feature that got a computer-illiterate general population to start learning about and buying personal computers en masse.

Without networking, you can do amazing things with a computer, but your audience is limited to the people who can come over to look at your screen or who can read the printouts or load the CDs and DVDs you distribute. Connect the same computer to the Internet and you can communicate across town or across the world.

The Internet's architecture supports an unlimited number of applications, but it boasts two killer apps of its own — two applications that people get online just to use. One is, of course, the incredibly popular World Wide Web, which is covered in Chapter 20, "Web Applications and Web Services."

The Internet's other killer app is e-mail, which is covered in depth in this chapter.

In this chapter you learn:

  • To use standard libraries to write applications that compose, send, and receive e-mail

  • To create programs that send and receive data in custom formats.

  • The basics of socket programming

Get Beginning Python®: Using Python 2.6 and Python 3.1 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.