[PYTHON MATRIX-SIG] Reading text files
Konrad Hinsen
hinsen@ibs.ibs.fr
Wed, 12 Mar 1997 10:18:04 +0100
> It has been my dream to be able to emulate the following FORTRAN idiom
> (sorry, I don't remember the syntax very well) in Python.
>
> READ (FILE,"F4.8, F4.8") A(I), B(I), I=1,100
Check out my FortranFormat module at ftp.python.org or on my Web page
(http://www.yi.com/home/HinsenKonrad/python.html). It lets you read
and write lists of objects using a subset of Fortran format strings.
> to be able to write these files. More importantly, it would be nice to be
> able to work with FORTRAN binary files which have cryptic block-header stuff
> attached. Perhaps those should have their own file class.
I also have a somewhat experimental C extension module that can read
Fortran binary files into arrays. I'll put it on my Web page.
> I've considered attacking this, but the task seemed to daunting. Would the
> easiest way be to use the fortran library directly? This would require people
I'd prefer to avoid Fortran libraries, which add a lot of overhead and
cause installation headaches.
--
-------------------------------------------------------------------------------
Konrad Hinsen | E-Mail: hinsen@ibs.ibs.fr
Laboratoire de Dynamique Moleculaire | Tel.: +33-4.76.88.99.28
Institut de Biologie Structurale | Fax: +33-4.76.88.54.94
41, av. des Martyrs | Deutsch/Esperanto/English/
38027 Grenoble Cedex 1, France | Nederlands/Francais
-------------------------------------------------------------------------------
_______________
MATRIX-SIG - SIG on Matrix Math for Python
send messages to: matrix-sig@python.org
administrivia to: matrix-sig-request@python.org
_______________