[SciPy-user] reading binary files written by a gfortran code...

fred fredmfp@gmail....
Sun Jun 15 12:38:32 CDT 2008

Phil Austin a écrit :
> You want to write/read direct access files, which are just the bytes
> without the compiler-specific recordlength information.  Here is
> an example of a some tutorial code I wrote for myself exercising
> memmap and a fortran direct-access read -- just replace read with
> write in the fortran code to get output
Thanks Phil.

But I would rather prefer the "magic line" fortran code (if it exists) 
to write directly the binary file with the right format.

For instance, as seen on the web,

open(unit=20, file='foo.dat', form='unformatted', access='stream')
does not work:

  Fortran runtime error: Bad ACCESS parameter in OPEN statement

In fact, I would like to know all access parameters for the open 
statement. Where could I get them ?

I did not find relevant info, in gfortran manpage, gfortran info, etc.



More information about the SciPy-user mailing list