Is it possible to read Fortran formatted data in Python?

Posted by Werner on Stack Overflow See other posts from Stack Overflow or by Werner
Published on 2010-02-25T17:50:50Z Indexed on 2010/03/28 6:43 UTC
Read the original article Hit count: 247

Filed under:
|
|
|

I get output files from very old Fortran programs, which look like:

 0.81667E+00  -0.12650E+01  -0.69389E-03
 0.94381E+00  -0.11985E+01  -0.11502E+00
 0.96064E+00  -0.11333E+01  -0.17616E+00
 0.10202E+01  -0.12435E+01  -0.93917E-01
 0.10026E+01  -0.10904E+01  -0.15108E+00
 0.90516E+00  -0.11030E+01  -0.19139E+00
 0.98624E+00  -0.11598E+01  -0.22970E+00

Is it possible to read this in Python and convert the numbers to "normal" floats?

© Stack Overflow or respective owner

Related posts about fortran

Related posts about python