import socket #host = "localhost" host = "192.168.1.117" #host = "192.168.1.100" s = socket.socket() s.connect((host, 5500)) while True: mensaje = raw_input("> ") s.send(mensaje) if mensaje == "quit": break recibido = s.recv(1024) print "Recibido:", recibido print "adios" s.close()