Mega Code Archive

 
Categories / Python Tutorial / Network
 

A Minimal Client

import socket s = socket.socket() host = socket.gethostname() port = 1234 s.connect((host, port)) print s.recv(1024)