Unpacking binary data with struct.unpack

Holger Fuessler holger at fuessler-net.de
Sat Aug 12 05:33:12 EDT 2000


> As far as values embedded within the payload (which neither TCP nor IP
> understand nor care about), then as you say any order can be used -
> it's up to the applications creating and processing the data.
 
Is there an internet standard for this? The RFC868 only says it's a 4-byte
integer and nothing more. Decoding the 4 bytes with network decoding (using
!i in the unpack string) gives me an integer, but it's not - as far as I
understand the RFC - in the right scale.
 
Has anybody a routine that gives a binary view of a python integer (like
01110101). Maybe I could figure out the encoding that way.
 
Greetings Holger
 
 


-- 
Holger M. Fuessler
holger at fuessler-net.de
Tel.: +49 621 1221292



More information about the Python-list mailing list