예제 #1
0
 def _raw_parser(self, from_=None):
     if self.config.changed or self.__raw_parser_cache is None \
             or self.__from != from_:
         config = self.config.configuration
         self.__from = from_
         if from_:
             stream_factory = getattr(config.stream_factory, 'from_' + from_)
         else:
             stream_factory = config.stream_factory.auto
         self.__raw_parser_cache = \
             make_raw_parser(self, stream_factory, config)
     return self.__raw_parser_cache
예제 #2
0
 def _raw_parser(self, from_=None):
     if self.config.changed or self.__raw_parser_cache is None \
             or self.__from != from_:
         config = self.config.configuration
         self.__from = from_
         if from_:
             stream_factory = getattr(config.stream_factory,
                                      'from_' + from_)
         else:
             stream_factory = config.stream_factory.auto
         self.__raw_parser_cache = \
             make_raw_parser(self, stream_factory, config)
     return self.__raw_parser_cache
예제 #3
0
 def _raw_parser(self, from_=None):
     '''
     Provide the parser.  This underlies the "fancy" methods below.
     '''
     if self.config.changed or self.__raw_parser_cache is None \
             or self.__from != from_:
         config = self.config.configuration
         self.__from = from_
         if from_:
             stream_factory = \
                 getattr(config.stream_factory, 'from_' + from_)
         else:
             stream_factory = config.stream_factory  # __call__
         self.__raw_parser_cache = \
             make_raw_parser(self, stream_factory, config)
     return self.__raw_parser_cache
예제 #4
0
파일: config.py 프로젝트: gcarothers/lepl
 def _raw_parser(self, from_=None):
     '''
     Provide the parser.  This underlies the "fancy" methods below.
     '''
     if self.config.changed or self.__raw_parser_cache is None \
             or self.__from != from_:
         config = self.config.configuration
         self.__from = from_
         if from_:
             stream_factory = \
                 getattr(config.stream_factory, 'from_' + from_)
         else:
             stream_factory = config.stream_factory # __call__
         self.__raw_parser_cache = \
             make_raw_parser(self, stream_factory, config)
     return self.__raw_parser_cache