PEATDB/Labbook.py
def addBlob(self, row, col, filename):
        """Adds an external file as a blob to the DB"""
        from Record import FileRecord
        f=os.path.split(filename)[1]
        model = self.getModel()
        blob = self.getBlob(filename)
        f = FileRecord(name=filename, blob=blob)
        rec = {'text': f.name, 'filename': filename}
        model.setValueAt(rec, row, col)
        #we add the blob to the parent DB blob struct rather than to table model
        self.DB.blobs[filename] = f
        #print f, blob, model.getCellRecord(row,col)
        return
Adds an external file as a blob to the DB
Adds an external file as a blob to the DB
Adds an external file as a blob to the DB
def addBlob(self, row, col, filename):
        from Record import FileRecord
        f=os.path.split(filename)[1]
        model = self.getModel()
        blob = self.getBlob(filename)
        f = FileRecord(name=filename, blob=blob)
        rec = {'text': f.name, 'filename': filename}
        model.setValueAt(rec, row, col)
        self.DB.blobs[filename] = f
        return
def addBlob ( self , row , col , filename ) : from Record import FileRecord f = os . path . split ( filename ) [ 1 ] model = self . getModel ( ) blob = self . getBlob ( filename ) f = FileRecord ( name = filename , blob = blob ) rec = { 'text' : f . name , 'filename' : filename } model . setValueAt ( rec , row , col ) self . DB . blobs [ filename ] = f return
Adds an external file as a blob to the DB
Adds an external file as a blob to the DB
"""Adds an external file as a blob to the DB""" #we add the blob to the parent DB blob struct rather than to table model #print f, blob, model.getCellRecord(row,col)
self
row
col
filename