<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">New to python and would like to test network/sockets with it.<div><br></div><div>I am having a problem where I have setup the following:</div><div><br></div><div><div><font class="Apple-style-span" color="#0034ff">import socket, sys, struct</font></div><div><font class="Apple-style-span" color="#0034ff"><br></font></div><div><font class="Apple-style-span" color="#0034ff">HOST = '1.1.1.1'</font></div><div><font class="Apple-style-span" color="#0034ff">PORT = 153</font></div><div><font class="Apple-style-span" color="#0034ff">s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)</font></div><div><font class="Apple-style-span" color="#0034ff">s.connect((HOST, PORT))</font></div><div><font class="Apple-style-span" color="#0034ff"><br></font></div><div><font class="Apple-style-span" color="#0034ff">data = struct.unpack('!I',s.recv(4))[0]</font></div><div><font class="Apple-style-span" color="#0034ff"><br></font></div><div><font class="Apple-style-span" color="#0034ff">s.close()</font></div></div><div><font class="Apple-style-span" color="#0034ff"><br></font></div><div><font class="Apple-style-span" color="#0034ff">print data</font></div><div><font class="Apple-style-span" color="#0034ff"><br></font></div><div><font class="Apple-style-span" color="#0034ff"><br></font></div><div>What I would like to do is take the input from the server, and store it in an array.  The type of data is int.</div><div><br></div><div>Can someone help?</div><div><br></div><div><br></div><div>Thanks, Johnny</div><div><br></div></body></html>