0001"""Configuration API."""
0002
0003import release
0004__revision__ = "$Rev: 332 $"
0005__date__ = "$Date: 2006-05-20 22:26:35 +0000 (Sat, 20 May 2006) $"
0006__author__ = "David Stanek <dstanek@dstanek.com>"
0007__copyright__ = "Copyright 2006, David Stanek"
0008__license__ = release.license
0009
0010_properties = {
0011}
0012
0013def get(name, default=None):
0014    """Get the property identified by name if it exists or return default.
0015
0016    name: the name of the property to retrieve
0017    default: the value returned for non-existing properties, defaults to None
0018
0019    """
0020    return _properties.get(name, default)
0021
0022def set(name, value):
0023    """The the property identified by name with the value identified by value.
0024
0025    Returns the value passed in.
0026    """
0027    _properties[name] = value
0028    return value
0029
0030def isset(name):
0031    """Returns True if a property exists or False if it doesn't."""
0032    return _properties.has_key(name)
0033
0034def remove(name):
0035    """Remove a property."""
0036    if name in _properties:
0037        del _properties[name]