Sockets: Receiving C Struct

2011-08-05 Thread Johnny Venter
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.c

Re: Sockets: Receiving C Struct

2011-08-05 Thread Dan Stromberg
ship was accepted. > > Please disregard if it's a duplicate. > > Thanks > > Begin forwarded message: > > *From: *Johnny Venter > *Date: *August 5, 2011 8:15:53 AM EDT > *To: *python-list@python.org > *Subject: **Sockets: Receiving C Struct* > > New to python a

Fwd: Sockets: Receiving C Struct

2011-08-05 Thread Johnny Venter
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 > Date: August 5, 2011 8:15:53 AM EDT > To: python-list@python.org > Subject: Sockets: Receiving C Struct &