`import socket
HOST = '......' # The remote host
PORT = ..... # The same port as used by the server
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((HOST, PORT))
data = s.recv(1934)
s.close()
print data`
i am sorry if it is stupid question but if i solve my problem i am too much ahead. i have a gyro sensor (box) that connect to my laptop with Lan. i only know the ip of this gyro (no idea about port). i want to connect to it with Python and take data. BTW as manufacturer told me i should define a alternative configuration (different ip in IPV4 for connection.it means ip in IPV4 should be different from Gyro). i try all codes in internet but as i understood i dont need to defined server because gyro automatically send data and i need only client.if you have any idea or code, it will be a good help for me. thanks in advance