pygcam.XMLConfigFile¶
API¶
- class pygcam.XMLConfigFile.XMLConfigFile(config_path)¶
Stores information about a GCAM config.xml file
- add_config_element(name, group, value)¶
Append a new element with the given name and value to the given group.
- delete_config_element(name, group)¶
Remove the Value element with the given name from the given group
- get_config_element(name, group)¶
Find the config file component with the specified tag and return the corresponding Element.
- classmethod get_instance(cfg_path)¶
Return a parsed version of the given config file.
- update_config_element(name, group, newName=None, newValue=None)¶
Update the name attribute, the value (element text), or both for the named config element.
- write(path=None)¶
Write out the modified configuration file tree to the same path that it was read from, or to the given path.
- Parameters
path – (str) pathname to write to
- Returns
none