Package docutils :: Module frontend :: Class ConfigParser
[show private | hide private]
[frames | no frames]

Class ConfigParser

ConfigParser --+
               |
              ConfigParser


Method Summary
  get_section(self, section, raw, vars)
Return a given section as a dictionary (empty if the section doesn't exist).
  optionxform(self, optionstr)
Transform '-' to '_' so the cmdline form of option names can be used.
  read(self, filenames, option_parser)
  read_standard_files(self, option_parser)
  validate_options(self, filename, option_parser)
    Inherited from ConfigParser
  __init__(self, defaults)
  add_section(self, section)
Create a new section in the configuration.
  defaults(self)
  get(self, section, option, raw, vars)
Get an option value for a given section.
  getboolean(self, section, option)
  getfloat(self, section, option)
  getint(self, section, option)
  has_option(self, section, option)
Check for the existence of a given option in a given section.
  has_section(self, section)
Indicate whether the named section is present in the configuration.
  options(self, section)
Return a list of option names for the given section name.
  readfp(self, fp, filename)
Like read() but the argument must be a file-like object.
  remove_option(self, section, option)
Remove an option.
  remove_section(self, section)
Remove a file section.
  sections(self)
Return a list of section names, excluding [DEFAULT]...
  set(self, section, option, value)
Set an option.
  write(self, fp)
Write an .ini-format representation of the configuration state.

Class Variable Summary
tuple standard_config_files = ('/etc/docutils.conf', './docuti...
dict validation = {'options': {'error_encoding': <function va...
    Inherited from ConfigParser
SRE_Pattern OPTCRE = ([\]-\[\w_\.\*,\(\)\{\}]+)[ \t]*([:=])[ \t]*(.*...
SRE_Pattern SECTCRE = \[([^\]]+)\]

Method Details

get_section(self, section, raw=0, vars=None)

Return a given section as a dictionary (empty if the section doesn't exist).

All % interpolations are expanded in the return values, based on the defaults passed into the constructor, unless the optional argument raw is true. Additional substitutions may be provided using the vars argument, which must be a dictionary whose contents overrides any pre-existing defaults.

The section DEFAULT is special.

optionxform(self, optionstr)

Transform '-' to '_' so the cmdline form of option names can be used.
Overrides:
ConfigParser.ConfigParser.optionxform

Class Variable Details

standard_config_files

Type:
tuple
Value:
('/etc/docutils.conf', './docutils.conf', '/home/edloper/.docutils')   

validation

Type:
dict
Value:
{'options': {'error_encoding': <function validate_encoding at 0x82454d\
4>,
             'error_encoding_error_handler': <function validate_encodi\
ng_error_handler at 0x8245544>,
             'input_encoding': <function validate_encoding at 0x82454d\
4>,
             'output_encoding': <function validate_encoding at 0x82454\
d4>,
...                                                                    

Generated by Epydoc 2.0 on Tue Jul 22 05:31:24 2003 http://epydoc.sf.net