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