compwa_policy.utilities.cfg module

compwa_policy.utilities.cfg module#

Helper functions for formatting .cfg files.

extract_config_section(extract_from: Path | str, extract_to: Path | str, sections: list[str]) None[source]#
format_config(input: Path | TextIOBase | str, output: Path | TextIOBase | str, additional_rules: Iterable[Callable[[str], str]] | None = None) None[source]#
open_config(definition: Path | TextIOBase | str) ConfigParser[source]#
write_config(cfg: ConfigParser, output: Path | TextIOBase | str) None[source]#