コード例 #1
0
ファイル: config.py プロジェクト: willtang/lyx2ebook
 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
ファイル: config.py プロジェクト: devs1991/test_edx_docmode
 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