class SMFReader(object): def __init__(self, input_file): self.smf_parser = SMFParser() self.input_file = input_file def read(self): with open(self.input_file, 'r') as fh: [self.parse_line(line) for line in fh.readlines()] def parse_line(self, line): line = line.strip() if len(line) > 0: self.smf_parser.parse(line) def faces(self): return self.smf_parser.faces def points(self): return self.smf_parser.points
def __init__(self, input_file): self.smf_parser = SMFParser() self.input_file = input_file