Module config :: Class ConfigList
[show private | hide private]
[frames | no frames]

Type ConfigList

object --+    
         |    
      list --+
             |
            ConfigList


This class implements an ordered list of configurations and allows you to try getting the configuration from each entry in turn, returning the first successfully obtained value.
Method Summary
any getByPath(self, path)
Obtain a value from the first configuration in the list which defines it.
    Inherited from list
  __init__(...)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
  __add__(x, y)
Return x+y...
  __contains__(x, y)
Return y in x...
  __delitem__(x, y)
Return del x[y]...
  __delslice__(x, i, j)
Use of negative indices is not supported.
  __eq__(x, y)
Return x==y...
  __ge__(x, y)
Return x>=y...
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __getitem__(x, y)
Return x[y]...
  __getslice__(x, i, j)
Use of negative indices is not supported.
  __gt__(x, y)
Return x>y...
  __hash__(x)
Return hash(x)...
  __iadd__(x, y)
Return x+=y...
  __imul__(x, y)
Return x*=y...
  __iter__(x)
Return iter(x)...
  __le__(x, y)
Return x<=y...
  __len__(x)
Return len(x)...
  __lt__(x, y)
Return x<y...
  __mul__(x, n)
Return x*n...
  __ne__(x, y)
Return x!=y...
  __new__(T, S, ...)
Return a new object with type S, a subtype of T...
  __repr__(x)
Return repr(x)...
  __reversed__(L)
return a reverse iterator over the list
  __rmul__(x, n)
Return n*x...
  __setitem__(x, i, y)
Return x[i]=y...
  __setslice__(x, i, j, y)
Use of negative indices is not supported.
  append(L, object)
append object to end
  count(L, value)
return number of occurrences of value
  extend(L, iterable)
extend list by appending elements from the iterable
  index(...)
L.index(value, [start, [stop]]) -> integer -- return first index of value
  insert(L, index, object)
insert object before index
  pop(L, index)
remove and return item at index (default last)
  remove(L, value)
remove first occurrence of value
  reverse(L)
reverse *IN PLACE*
  sort(L, cmp, key, reverse)
stable sort *IN PLACE*; cmp(x, y) -> -1, 0, 1
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value
  __str__(x)
Return str(x)...

Method Details

getByPath(self, path)

Obtain a value from the first configuration in the list which defines it.
Parameters:
path - The path of the value to retrieve.
           (type=str)
Returns:
The value from the earliest configuration in the list which defines it.
           (type=any)
Raises:
ConfigError - If no configuration in the list has an entry with the specified path.