struct.unpack

g.franzkowiak g.franzkowiak at onlinehome.de
Sun Oct 2 16:08:17 EDT 2005


Hello Everybody,

I've read a pipe and store it in a object.
My next step was the separation from 4 bytes with
obj = string.join(list(dataObject)[:4]	==> '\x16 \x00 \x00 \x00'
and the converting  by
value = struct.unpack('I', obj) generated the error
"unpack str size does not match format"

Unfortunately is len(obj) 7, but integer lengt 4.
Why 7 ?

Any ideas ?

gf



More information about the Python-list mailing list