binary conversion issues

godavemon davefowler at gmail.com
Tue Aug 8 11:52:33 EDT 2006


I'm using python's struct and binascii modules to write some values
from my parser to binary floats.  This works great for all of my binary
files except one.  For some reason this file is saving to 836 (stated
by my command shell) bytes instead of 832 like it should.  It sounds
like an issue with whatever's writing that particular file out but I've
checked it 100 times.  Also python can read in the 836 byte file, find
it has a size of 832 bytes and convert back each value perfectly.
However, when I read in the file in C++ it finds a file of size 836 and
in the middle of the data starts spitting out junk.  Has anyone run
into an issue like this or have an idea of what it could be?




More information about the Python-list mailing list