Module configuration :: Class PropertiesConfiguration
[hide private]
[frames] | no frames]

Class PropertiesConfiguration

source code

            object --+    
                     |    
UserDict.DictMixin --+    
                     |    
         Configuration --+
                         |
                        PropertiesConfiguration

A Configuration that parses a plain text properties file.

This typically follows the java.util.Properties format.

Note: This code is mostly based on this recipe http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/496795. Copyright (c) Anand Balachandran Pillai



Instance Methods [hide private]
 
__init__(self, stream=None, data=None)
Initialization.
source code
 
__parse(self, lines)
Parse a list of lines and create an internal property dictionary
source code
 
processPair(self, key, value)
Process a (key, value) pair
source code
 
escape(self, value) source code
 
unescape(self, value) source code
 
load(self, stream)
Load properties from an open file stream
source code
 
store(self, out)
Serialize the properties back to a file.
source code

Inherited from Configuration: __delitem__, __getitem__, __setitem__, __str__, get, get_boolean, get_int, get_list, interpolate, keys, match_name

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__

Inherited from UserDict.DictMixin: __cmp__, __contains__, __iter__, __len__, clear, has_key, items, iteritems, iterkeys, itervalues, pop, popitem, setdefault, update, values

Class Variables [hide private]

Inherited from Configuration: key_re

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, stream=None, data=None)
(Constructor)

source code 
Initialization.
Overrides: Configuration.__init__
(inherited documentation)