socket – Network CommunicationΒΆ

Purpose:Provides access to network communication
Available In:1.4 and later

The socket module exposes the low-level C API for communicating over a network using the BSD socket interface. It includes the socket class, for handling the actual data channel, and functions for network-related tasks such as converting a server’s name to an address and formatting data to be sent across the network.

See also

The standard library documentation for this module.
Socket Programming HOWOTO
An instructional guide by Gordon McMillan, included in the standard library documentation.
Testing a socket to see if it is ready for reading or writing.
Framework for creating network servers.
asyncore and asynchat
Frameworks for asynchronous communication.
urllib and urllib2
Most network clients should use the more convenient libraries for accessing remote resoruces through a URL.
Unix Network Programming, Volume 1: The Sockets Networking API, 3/E
By W. Richard Stevens, Bill Fenner, and Andrew M. Rudoff. Published by Addison-Wesley Professional, 2004. ISBN-10: 0131411551