On Mar 30, 4:31 am, John Machin <[EMAIL PROTECTED]> wrote: > On Mar 30, 3:58 pm, hdante <[EMAIL PROTECTED]> wrote: > > > > > On Mar 29, 3:44 pm, "[EMAIL PROTECTED]" > > > <[EMAIL PROTECTED]> wrote: > > > Hello, > > > > I am having trouble writing the code to read a binary string. I would > > > like to extract the values for use in a calculation. > > > > Any help would be great. > > > I'm too lazy to debug your binary string, but I suggest that you > > completely throw away the binary file and restart with a database or > > structured text. See, for example: > > > http://pyyaml.org/wiki/PyYAML > > > If you have some legacy binary file that you need to process, try > > creating a C program that freads the binary file and printfs a text > > equivalent. > > ... and that couldn't be done faster and better in Python??
No. A C struct is done faster and better than python (thus, the correctness check is faster in C). Also, chances are high that there's already an include file with the binary structure. -- http://mail.python.org/mailman/listinfo/python-list