def import_fileset(self): """Import a series of external files in a folder""" if self.parent == None: import tkMessageBox tkMessageBox.showwarning( "Not available", "You can't use this feature outside PEAT.") return from Extfile import FileHandler fh = FileHandler(parent=self) fh.importFileset(DB=self.DB, callback=self.currenttable.redrawTable) return
def displayFile(self, row, col): """Uses a new method of file storage with blobs We just get the blob from the filerecord object""" from Extfile import FileHandler model = self.getModel() celldata = model.getCellRecord(row, col) if celldata != None: filerec = celldata else: return fh = FileHandler(self) fh.displayFile(filerec) return
def addFile(self, row, col): """Uses a new method of file storage with blobs We just get the blob from the filerecord object""" from Extfile import FileHandler model = self.getModel() celldata = model.getCellRecord(row, col) fh = FileHandler(self) newfile = fh.addFileDialog() print newfile if newfile != None: self.addBlob(row, col, fh.newfile) self.redrawTable() print model.getValueAt(row, col) return