π Application Programming Interface#
galactic.io.data.burmeister
module
Class
BurmeisterDataReader
for reading.cxt
file
- class BurmeisterDataReader#
Bases:
object
ΜBurmeister
Data reader.Example
>>> from galactic.io.data.burmeister import BurmeisterDataReader >>> reader = BurmeisterDataReader() >>> import io >>> text = '''B ... ... 2 ... 2 ... ... 1 ... 2 ... a ... b ... .X ... XX ... ''' >>> data = reader.read(io.StringIO(text)) >>> [ ... (key, sorted(list(values))) ... for key, values in data.items() ... ] [('1', ['b']), ('2', ['a', 'b'])]
Notes
See also https://upriss.github.io/fca/fcafileformats.html#Burmeister
- extensions()#
Get an iterator over the supported extensions.
- Returns:
An iterator over the supported extensions
- Return type:
Iterator[str]
- read(data_file)#
Read a
Burmeister
data file.- Parameters:
data_file (
TextIO
) β A readable text file.- Returns:
The data.
- Return type:
Data
- Raises:
RuntimeError β If the
Burmeister
HEADER is not detected