Halberd.conflib.ConfReader

Package Halberd :: Module conflib :: Class ConfReader |
[hide private]
[frames] | no frames]

# Class ConfReader

source code

Takes care of turning configuration files into meaningful information.

Instance Methods | [hide private]
__init__(self) | source code
open(self, fname) Opens the configuration file. | source code
close(self) Release the configuration file's descriptor. | source code
_getAddr(self, sectname, default_port) Read a network address from the given section. | source code
parse(self) Parses the configuration file. | source code
writeDefault(self, conf_file) Write a bare-bones configuration file | source code
__del__(self) | source code

Method Details | [hide private]

### open(self, fname) | source code
Opens the configuration file. Parameters: `fname` (`str`) - Pathname to the configuration file. Raises: `InvalidConfFile` - In case the passed file is not a valid one.

### writeDefault(self, conf_file) | source code
Write a bare-bones configuration file Parameters: `conf_file` (`str`) - Target file where the default conf. will be written.