/search.css" rel="stylesheet" type="text/css"/> /search.js">
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

Public Member Functions
DybDbi::vrb::CFConf Class Reference

List of all members.

Public Member Functions

def __init__
def __repr__

Detailed Description

Usage::

      from tools impoty CFConf
      def handler( val ):
          return dict()
      cfc = CFConf("offsets.cfg", "mig20120820", handler ) 

The handler parses the config value and returns a dict  

Definition at line 26 of file vrb.py.


Constructor & Destructor Documentation

def DybDbi::vrb::CFConf::__init__ (   self,
  path,
  section,
  parse_cfg_ = lambda _:{} 
)

Definition at line 38 of file vrb.py.

00038                                                             :{} ):
00039         dict.__init__(self)
00040         from ConfigParser import ConfigParser
00041         cfp = ConfigParser()
00042         cfp.optionxform = str   ## avoid lowercasing keys, making the keys case sensitive
00043         path = os.path.expandvars(os.path.expanduser(path))
00044         cfp.read(path) 
00045         assert cfp.has_section(section), "section %s not present in config file %s " % ( section, path)
00046         for key, val in cfp.items(section):
00047             self[key] = parse_cfg_( val )
00048 

Member Function Documentation

def DybDbi::vrb::CFConf::__repr__ (   self)

Definition at line 49 of file vrb.py.

00050                       :
00051         return pformat(dict(self))
00052 
00053 


The documentation for this class was generated from the following file:
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Fri May 16 2014 09:57:25 for DybDbi by doxygen 1.7.4