def ReadFromCurrentFile(self) -> list: list = [] try: #Open the currently selected file to stream data through with open(self.filepath) as csvFile: reader = csv.reader(csvFile, deliminator=self.strDeliminator, quotechar=self.strQuoteChar) for row in reader: list.append(row) return list except errorValue: list = [] return list
def WriteToFile(self, writeList: list) -> str: try: if (self.iColumnCount >= 0): raise NameError("Column Count is less than zero") else: with open(self.strFilePath) as csvFile: writer = csv.Writer(self.strFilePath) for row in writeList: writer. except errorValue: return errorValue ######################################################### #Private Members - Do not Access From outside the Class! #########################################################