Beispiel #1
0
 def __init__(self, filePath, readerSettingsLevel):
     self.filePath = filePath
     if isinstance(readerSettingsLevel, str):
         self.settings = rc.getReaderSettings(readerSettingsLevel)
     else:
         self.settings = {}
         for level in readerSettingsLevel:
             self.settings.update(rc.getReaderSettings(level))
Beispiel #2
0
 def __init__(self, files, parser):
     if not issubclass(parser, BaseReader):
         raise SamplerError(
             "parser argument must be a subclass of BaseReader, not "
             "{}".format(parser.__name__))
     self.settings = rc.getReaderSettings('sampler')
     self.files = extendFiles(files)
     self.__parserCls = parser
     self.parsers = set()
     self.map = {}
     self.read()