Package twisted :: Package runner :: Module inetdconf :: Class SimpleConfFile

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

## Class SimpleConfFile

Known Subclasses:
  `InetdConf`, `ServicesConf`, `RPCServicesConf`

Simple configuration file parser superclass.

Filters out comments and empty lines (which includes lines that only contain comments).

To use this class, override parseLine or parseFields.

Method Summary
| ``parseFields`(self, *fields)` Override this.
| ``parseFile`(self, file)` Parse a configuration file
| ``parseLine`(self, line)` Override this.

Class Variable Summary
`string` | `commentChar`
`None` | `defaultFilename`

Method Details

### parseFields(self, *fields)

Override this.

### parseFile(self, file=None)

Parse a configuration file

If file is None and self.defaultFilename is set, it will open defaultFilename and use it.

### parseLine(self, line)

Override this.

By default, this will split the line on whitespace and call self.parseFields (catching any errors).

Class Variable Details

### commentChar

  Type:
    `string`
  Value:

        '#'

### defaultFilename

  Type:
    `None`
  Value:

        None

Generated by Epydoc 1.1 on Sat Feb 15 21:19:17 2003 | http://epydoc.sf.net