Package Products :: Package ZenUtils :: Module config :: Class Config
[hide private]
[frames] | no frames]

Class Config

source code

object --+    
         |    
      dict --+
             |
            Config
Known Subclasses:

A bunch of configuration settings. Uses dictionary access, or object attribute access.

Provides some Convenience functions for different types.

Instance Methods [hide private]
 
__getattr__(self, attr) source code
 
getbool(self, key, default=None)
Convenience function to convert the value to a bool.
source code
 
getboolean(self, key, default=None)
Convenience function to convert the value to a bool.
source code
 
getint(self, key, default=None)
Convenience function to convert the value to an int.
source code
 
getfloat(self, key, default=None)
Convenience function to convert the value to a float.
source code

Inherited from dict: __cmp__, __contains__, __delitem__, __eq__, __ge__, __getattribute__, __getitem__, __gt__, __init__, __iter__, __le__, __len__, __lt__, __ne__, __new__, __repr__, __setitem__, __sizeof__, clear, copy, fromkeys, get, has_key, items, iteritems, iterkeys, itervalues, keys, pop, popitem, setdefault, update, values, viewitems, viewkeys, viewvalues

Class Variables [hide private]

Inherited from dict: __hash__

Method Details [hide private]

getbool(self, key, default=None)

source code 

Convenience function to convert the value to a bool. Valid values are and case of true, yes, y, 1 anything else is considered False.

If key doesn't exist, returns `default`.

getboolean(self, key, default=None)

source code 

Convenience function to convert the value to a bool. Valid values are and case of true, yes, y, 1 anything else is considered False.

If key doesn't exist, returns `default`.

getint(self, key, default=None)

source code 

Convenience function to convert the value to an int. Valid values are anything `int(x)` will accept.

If key doesn't exist or can't be converted to int, returns `default`.

getfloat(self, key, default=None)

source code 

Convenience function to convert the value to a float. Valid values are anything `float(x)` will accept.

If key doesn't exist or can't be converted to float, returns `default`.