Package Halberd :: Module conflib :: Class ConfReader

[show private | hide private]
[frames | no frames]

## Class ConfReader

Takes care of turning configuration files into meaningful information.

Method Summary
| `__init__(self)`
| `__del__(self)`
| ``close`(self)` Release the configuration file's descriptor.
| ``open`(self, fname)` Opens the configuration file.
| ``parse`(self)` Parses the configuration file.
| ``writeDefault`(self, conf_file)` Write a bare-bones configuration file
| ``_getAddr`(self, sectname, default_port)` Read a network address from the given section.

Method Details

### close(self)

Release the configuration file's descriptor.

### open(self, fname)

Opens the configuration file.

  Parameters:
    `fname` - Pathname to the configuration file.
    (type=`str`)
  Raises:
    `InvalidConfFile` - In case the passed file is not a valid one.

### parse(self)

Parses the configuration file.

### writeDefault(self, conf_file)

Write a bare-bones configuration file

  Parameters:
    `conf_file` - Target file where the default conf. will be written.
    (type=`str`)

### _getAddr(self, sectname, default_port)

Read a network address from the given section.

Generated by Epydoc 2.1 on Thu Aug 24 19:08:31 2006 | http://epydoc.sf.net