ReReadingConfigParser (version $Id: ReReadingConfigParser.py 3687 2008-08-16 08:29:51Z m.dornseif@hudora.de $)
index
/Users/md/code2/managed/_huTools/trunk/huTools/ReReadingConfigParser.py

ReReadingConfigParser is designed to be mainly compatible with
ConfigParser but checks before access to values if the
configuration file on disk has changed and re-reads the file if
necessary.
 
The detection of filechange is done by comparing the mtime of the
file with the mtime the file had when it was last read.
 
A big difference to the original ConfigParser is that
ReReadingConfigParser does not support setting Values or writing the
configuration to disk.
 
ReReadingConfigParser.read() only work with a single file not with
lists of filenames. ReReadingConfigParser.readfp() only works with
file like objects which have a name associated and can be
os.stat()ed.
 
add_section(), set(), write(), remove_option() and
remove_section() are not supported.
 
 
Authors:
 
This Software was written by md@hudora.de for the twisd AG,
Bonn, Germany. The twisd AG kindly donated it as Freie Software.

 
Modules
       
os
stat

 
Classes
       
ConfigParser.ConfigParser(ConfigParser.RawConfigParser)
ReReadingConfigParser

 
class ReReadingConfigParser(ConfigParser.ConfigParser)
    
Method resolution order:
ReReadingConfigParser
ConfigParser.ConfigParser
ConfigParser.RawConfigParser

Methods defined here:
ReReadIfChanged(self)
add_section(self, section)
get(self, section, option, raw=0, myvars=None)
options(self, section)
read(self, fpname)
readfp(self, fdescriptor, filename=None)
remove_option(self, section, option)
remove_section(self, section)
sections(self)
set(self, section, option, value)
write(self, fdescriptor)

Methods inherited from ConfigParser.ConfigParser:
items(self, section, raw=False, vars=None)
Return a list of tuples with (name, value) for each option
in the section.
 
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.

Methods inherited from ConfigParser.RawConfigParser:
__init__(self, defaults=None)
defaults(self)
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.
 
The DEFAULT section is not acknowledged.
optionxform(self, optionstr)

Data and other attributes inherited from ConfigParser.RawConfigParser:
OPTCRE = <_sre.SRE_Pattern object at 0x1fca0>
SECTCRE = <_sre.SRE_Pattern object at 0x42b3e0>

 
Functions
       
test()

 
Data
        __copyright__ = '(c) 2001 twisd AG, Bonn - http://www.twisd.de/\nf...under the terms of LGPL or classical\nMIT Licence.'
__revision__ = '$Revision: 3687 $'
__version__ = '$Id: ReReadingConfigParser.py 3687 2008-08-16 08:29:51Z m.dornseif@hudora.de $'