boostcfg#

import boostcfg

File parser for config files from Boost.

The boostcfg parser is a Python module for parsing Boost config files that can be parsed by the parse_config_file of boost::program_options.

BoostConfigParser was especially designed for Pawian.

class BoostConfigParser(filename: str | None = None)[source]#

Bases: object

Data structure that holds information of Boost config files.

read_config(filename: str, reset: bool = True) None[source]#

Parse a config line and to the internal dict.

append_value_from_line(line: str) None[source]#

Smartly append a key-value pair from a line.

append_value(key: str, value: Any) None[source]#

Append a key-value pair.

Append a key-value pair to the internal dictionary: convert existing string values to a list if a new value with the same key is added.

property config_file: str | None[source]#

Submodules and Subpackages