plasTeX 3.0 — A Python Framework for Processing LaTeX Documents

6.2.1 ConfigManager Objects

class ConfigManager()

A configuration manager.

addSection(name, description=None )

Creates a section with the given name and description and adds it to the ConfigManager.

name  is the key for accessing the section, which is also the section header used in the INI file.

description  is the header of the section for the cli ‘–help‘ function. Defaults to ‘name.capitalize() + " Options„

Returns the new ConfigSection object produced.

read(filenames )

loads config from the INI files in filenames . The function ignores files that do not exist. The argument may also be a single filename.

registerArgparse(parser )

adds command line options to parser  for each configuration item. This function merely delegates the job to the identically-named function of each of the sections.

updateFromDict(data )

reads in configuration options from the dict returned by ‘vars(ArgumentParser.parse_args)‘. This function merely delegates the job to the identically-named function of each of the sections.