# Echo client program import socket HOST = '' # The remote host PORT = 50008 # The same port as used by the server s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect((HOST, PORT)) # Change stuff starting here myport = 60001 s.send(str(myport) + ' that is my port') data = s.recv(1024) x = data.split(" ") print ' '.join(x) s.close() # print 'Received', repr(data)