| Home | Trees | Index | Help |
|---|
| Package qm :: Module common :: Class RcConfiguration |
|
RawConfigParser--+ |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.| Method Summary | |
|---|---|
Create a new configuration instance. | |
Retrieve a configuration variable. | |
Return a sequence of options. | |
Load configuration. | |
| Inherited from ConfigParser | |
Get an option value for a given section. | |
Return a list of tuples with (name, value) for each option in the section. | |
| Inherited from RawConfigParser | |
Create a new section in the configuration. | |
| |
| |
| |
| |
Check for the existence of a given option in a given section. | |
Indicate whether the named section is present in the configuration. | |
Return a list of option names for the given section name. | |
| |
Read and parse a filename or a list of filenames. | |
Like read() but the argument must be a file-like object. | |
Remove an option. | |
Remove a file section. | |
Return a list of section names, excluding [DEFAULT] | |
Set an option. | |
Write an .ini-format representation of the configuration state. | |
| Class Variable Summary | |
|---|---|
str |
user_rc_file_name = '.qmrc'
|
| Inherited from RawConfigParser | |
SRE_Pattern |
OPTCRE = ([^:=\s][^:=]*)\s*([:=])\s*(.*)$
|
SRE_Pattern |
SECTCRE = \[([^\]]+)\]
|
| Method Details |
|---|
__init__(self)
Create a new configuration instance.
|
Get(self, option, default, section=None)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)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. |
Load(self, section)Load configuration. 'section' -- The configuration section from which subsequent variables are loaded. |
| Class Variable Details |
|---|
user_rc_file_name
|
| Home | Trees | Index | Help |
|---|
| Generated by Epydoc 2.1 on Thu Sep 27 15:49:06 2007 | http://epydoc.sf.net |