On Oct 22, 2012, at 6:33 PM, MRAB <pyt...@mrabarnett.plus.com> wrote:

> Another way you could do it is:
> 
> while True:
>    chunk = byteStream.read(4)
>    if not chunk:
>        break
>    ...
> 
> And you could fetch multiple signatures in one read:
> 
> signatures = list(struct.unpack('>{}I'.format(valveCount), byteStream.read(4 
> * valueCount)))

Thanks, both great ideas. Still does the read/decode slightly different between 
the different sites, but at least it's localized better. Much appreciated.

--
Travis Griggs
"History has a habit of changing the people who think they are changing it." 
-Terry Pratchett

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to