tbplas.ConfigParser

class tbplas.ConfigParser(file_name: str)

Parser for *_config.dat and *_info.dat

__init__(file_name: str) None
Parameters:

file_name – file name of *_config.dat or *_info.dat

Methods

__init__(file_name)

parse_block(block_name)

Extract array defined by the block matching:

parse_line(key)

Extract and split line matching "key value".

__init__(file_name: str) None
Parameters:

file_name – file name of *_config.dat or *_info.dat

parse_block(block_name: str) ndarray
Extract array defined by the block matching:
begin block_name M N

x, x, x x, x, x …, …

end block_name

Parameters:

block_name – name of the block

Returns:

extracted array

parse_line(key: str) List[str]

Extract and split line matching “key value”. :param key: keyword of the line :return: matched line split with spaces

__weakref__

list of weak references to the object