def file(self,data=None,label="NOLABEL",ext='.dat'):
        filename = join(self.dir,'%06d_%s%s'%(self.count,label,ext))
        self.count += 1
        f = open(filename,'wb')
        if data != None:
            f.write(data)
            f.close()
        else:
            return f
Write the buffer data to a file.  If data == None then the file object is returned.
dataset/ETHPy150Open bolme/pyvision/src/pyvision/analysis/ImageLog.py/ImageLog.file