#!/usr/bin/python import socket my_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) #the first parameter indicates that #the socket is an internet socket #and the second parameter indicates #that it uses TCP HOST = "127.0.0.1" # Loopback interface PORT = 1060 # Sufficiently obscure port my_socket.bind((HOST, PORT)) while True: my_socket.listen(1) # this parameter keeps track of how many connections to back up clients_socket, clients_socket_name = my_socket.accept() # clients_socket.close()