/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 | Static Public Attributes | Properties
Scraper::base::parser::Cfg Class Reference

List of all members.

Public Member Functions

def regcls_

Static Public Attributes

tuple regcls_ = classmethod(regcls_)

Properties

 regcls = property(lambda self:self.regcls_(self['regime']))

Detailed Description

Holder for config dict with regime class lookup

Definition at line 46 of file parser.py.


Member Function Documentation

def Scraper::base::parser::Cfg::regcls_ (   cls,
  regime 
)
:param regime: absolute specification string of a class in a module of form  ``modpath:clsname`` eg ``Scraper.adtemp:AdTemp``
:return: the specified class

Definition at line 51 of file parser.py.

00052                             :
00053         """
00054         :param regime: absolute specification string of a class in a module of form  ``modpath:clsname`` eg ``Scraper.adtemp:AdTemp``
00055         :return: the specified class
00056         """
00057         modpath,clsname = regime.split(":")      
00058         log.debug("import regime %s modpath %s clsname %s " % (regime, modpath, clsname ))
00059         regmod = import_module( modpath ) 
00060         try:
00061             regcls = getattr( regmod , clsname )  
00062         except AttributeError:
00063             log.fatal("failed to access class from regime:%r modpath:%r clsname:%r regmod:%r " % ( regime,modpath,clsname, regmod ))  
00064             sys.exit(1)
        return regcls

Member Data Documentation

tuple Scraper::base::parser::Cfg::regcls_ = classmethod(regcls_) [static]

Definition at line 65 of file parser.py.


Property Documentation

Scraper::base::parser::Cfg::regcls = property(lambda self:self.regcls_(self['regime'])) [static]

Definition at line 50 of file parser.py.


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:50:03 for Scraper by doxygen 1.7.4