| Home | Trees | Indices | Help |
|---|
|
|
object --+
|
FortranRecordReader
Generate a reader object for FORTRAN format strings
Typical use case ...
>>> header_line = FortranRecordReader('(A15, A15, A15)') >>> header_line.read(' x y z') [' x', ' y', ' z'] >>> line = FortranRecordReader('(3F15.3)') >>> line.read(' 1.000 0.000 0.500') [1.0, 0.0, 0.5] >>> line.read(' 1.100 0.100 0.600') [1.1, 0.1, 0.6]
Note: it is best to create a new object for each format, changing the format causes the parser to reevalute the format string which is costly in terms of performance
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
Inherited from |
|||
|
|||
| format | |||
|
Inherited from |
|||
|
|||
x.__init__(...) initializes x; see help(type(x)) for signature
|
|
|||
format
|
| Home | Trees | Indices | Help |
|---|
| Generated by Epydoc 3.0.1 on Sun Feb 7 12:06:08 2016 | http://epydoc.sourceforge.net |