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

[frames | no frames]

## Class SimpleConfFile

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

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
`str` | `commentChar` = `'#'`
`NoneType` | `defaultFilename` = None

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:
    `str`
  Value:

        '#'

### defaultFilename

  Type:
    `NoneType`
  Value:

        None

Generated by Epydoc 2.0 on Sat May 15 20:07:45 2004 | http://epydoc.sf.net