def extract_contents(self, fileName): try: file_ref = open(fileName ,'rb') except: printl('Error opening %s' %fileName) tkMessageBox.showerror("File Error", "Error opening %s" %fileName) return None try: csvContents = [row for row in csv.reader(file_ref, delimiter = self.delimiter)] except: tkMessageBox.showerror("File Error", "CSV is not tab-delimited. Error opening %s" %fileName) return None self.numcolumnlist.append(max([len(x) for x in csvContents])) return csvFile(fileName, csvContents)
def variance(self): printl("Opening files")