On Sun, 30 Mar 2008 04:48:59 -0700 (PDT), hdante <[EMAIL PROTECTED]> wrote:
> On Mar 30, 4:31 am, John Machin <[EMAIL PROTECTED]> wrote:
>> On Mar 30, 3:58 pm, hdante <[EMAIL PROTECTED]> wrote:

>> >  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.

If a C struct defines the file format, he is probably screwed already.
There are no guarantees that even different compilers on the same
machine have the same struct layout.

I have never seen this done by a serious program.

/Jorgen

-- 
  // Jorgen Grahn <grahn@        Ph'nglui mglw'nafh Cthulhu
\X/     snipabacken.se>          R'lyeh wgah'nagl fhtagn!
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to