def write(self, line): """ Generic method to open and write a row to a CSV file """ with self.open_csv(self.path + self.file_name) as writer: writer.writerow(line)