PSCF v1.3
|
A Record represents a string of fields separated by whitespace. More...
Public Member Functions | |
__init__ (self, line) | |
Constructor. | |
__str__ (self) | |
String representation - line from which Record was constructed. |
A Record represents a string of fields separated by whitespace.
The constructor of this class takes a line of text containing fields separated by white spaces and divides it into fields and white space strings.
Data attributes: line - original string (usually a complete line) fields - list in which fields[i] is field string number i spaces - list in which spaces[i] is white space preceding field i
The element space[i] is the string of blank characters that precedes field[i], for i >= 0. The space[0] may contain zero characters, if the line has no leading blank spaces, but all other elements must contain one or more blank characters. Trailing white space is disregarded.
pscfpp.text.Record.__init__ | ( | self, | |
line ) |
Constructor.
line | string containing fields separated by white space |
Definition at line 97 of file text.py.
References pscfpp.command.Command.fields, fields, line, Pscf::Prdc::Basis< D >::Star.size, pscfpp.file.File.size, size, and spaces.
pscfpp.text.Record.__str__ | ( | self | ) |
String representation - line from which Record was constructed.
Definition at line 131 of file text.py.
References pscfpp.command.Command.fields, fields, Pscf::Prdc::Basis< D >::Star.size, pscfpp.file.File.size, size, and spaces.