Package qm :: Module common :: Class RcConfiguration
[hide private]
[frames] | no frames]

Class RcConfiguration

source code

ConfigParser.RawConfigParser --+    
                               |    
       ConfigParser.ConfigParser --+
                                   |
                                  RcConfiguration

Interface object to QM configuration files.

Configuration files are in the format parsed by the standard 'ConfigParser' module, namely 'win.ini'--style files.

Instance Methods [hide private]
 
__init__(self)
Create a new configuration instance.
source code
 
Load(self, section)
Load configuration.
source code
 
Get(self, option, default, section=None)
Retrieve a configuration variable.
source code
 
GetOptions(self, section=None)
Return a sequence of options.
source code

Inherited from ConfigParser.ConfigParser: get, items

Inherited from ConfigParser.ConfigParser (private): _interpolate, _interpolation_replace

Inherited from ConfigParser.RawConfigParser: add_section, defaults, getboolean, getfloat, getint, has_option, has_section, options, optionxform, read, readfp, remove_option, remove_section, sections, set, write

Inherited from ConfigParser.RawConfigParser (private): _get, _read

Class Variables [hide private]
  user_rc_file_name = '.qmrc'
The name of the user configuration file.

Inherited from ConfigParser.ConfigParser (private): _KEYCRE

Inherited from ConfigParser.RawConfigParser: OPTCRE, OPTCRE_NV, SECTCRE

Inherited from ConfigParser.RawConfigParser (private): _boolean_states

Method Details [hide private]

__init__(self)
(Constructor)

source code 

Create a new configuration instance.

Overrides: ConfigParser.RawConfigParser.__init__

Load(self, section)

source code 

Load configuration.

'section' -- The configuration section from which subsequent variables are loaded.

Get(self, option, default, section=None)

source code 

Retrieve a configuration variable.

'option' -- The name of the option to retrieve.

'default' -- The default value to return if the option is not found.

'section' -- The section from which to retrieve the option. 'None' indicates the section specified to the 'Load' method for this instance.

precondition -- The RC configuration must be loaded.

GetOptions(self, section=None)

source code 

Return a sequence of options.

'section' -- The section for which to list options, or 'None' for the section specified to 'Load'.

precondition -- The RC configuration must be loaded.