Unpacking binary data with struct.unpack
Holger Fuessler
holger at fuessler-net.de
Sat Aug 5 03:52:39 EDT 2000
Hi!
I'm trying to read time from a RFC868 Time Server. The Server gives an
32Bit-Integer representing the time.
Does anybody know how to unpack the string given by socket.recv(4)? Is this
correct for receiving the 32Bit value?
Using struct.unpack('i', data) gives me a ValueError: incomplete format
Maybe I have to use xdrlib or something.
Any help is appreciated
Holger
--
Holger M. Fuessler
holger at fuessler-net.de
More information about the Python-list
mailing list