I was not sure if this message was sent before my membership was accepted. Please disregard if it's a duplicate.
Thanks Begin forwarded message: > From: Johnny Venter <johnny.ven...@zoho.com> > Date: August 5, 2011 8:15:53 AM EDT > To: python-list@python.org > Subject: Sockets: Receiving C Struct > > New to python and would like to test network/sockets with it. > > I am having a problem where I have setup the following: > > import socket, sys, struct > > HOST = '1.1.1.1' > PORT = 153 > s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) > s.connect((HOST, PORT)) > > data = struct.unpack('!I',s.recv(4))[0] > > s.close() > > print data > > > 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. > > Can someone help? > > > Thanks, Johnny >
PGP.sig
Description: This is a digitally signed message part
-- http://mail.python.org/mailman/listinfo/python-list