Mega Code Archive

 
Categories / Python Tutorial / Network
 

Basic inetd server

import sys print "Welcome." print "Please enter a string:" sys.stdout.flush() line = sys.stdin.readline().strip() print "You entered %d characters." % len(line)