struct stricken

Dave Forrest (forrest@rsoc.rockwell.com)
11 Feb 1995 01:26:51 GMT

Greetings Python people!
Robin Friedrich, my trusty System Engineer, said that you folks might
be able to help me with a problem:

I am having trouble with the struct module reading doubles - it causes
a bus error & core dump. I can read ints, chars, floats, etc. just
fine, but not doubles. Any suggestions?

While I'm here, it also appears that the struct module is incapable of
writing doubles. I can't verify it either way, 'cause I get the same
core dump error when I try to struct.pack('d',x). Is this true? If
so it is a major limitation for us. Floats (which are being put out
as 4 bytes) just aren't good enough for high-accuracy trajectory
simulation.

Any help that you can offer will be deeply appreciated.

David Forrest
Python novice, rocket scientist