def processMatch(*fglob, **kwargs): '''Process image files found using fmatch() of arguments Convenience function of processFiles(), which gets passed all the keyword arguments. Check processFiles() docs for options. ''' fglob = fglob + (fileIO.IMAGE_FILE,) filelist = filter(lambda s: s.count(BACKGROUND_FILENAME_FLAG)==0, fileIO.flist(*fglob)) processFiles(filelist, **kwargs)
def processMatch(*fglob, **kwargs): '''Process image files found using fmatch() of arguments Convenience function of processFiles(), which gets passed all the keyword arguments. Check processFiles() docs for options. ''' fglob = fglob + (fileIO.IMAGE_FILE, ) filelist = filter(lambda s: s.count(BACKGROUND_FILENAME_FLAG) == 0, fileIO.flist(*fglob)) processFiles(filelist, **kwargs)
def fromMatch(*fglob): 'Load experiments from files using concatenation of argument list as a glob' files = filter(lambda x: x.count('str')>0, fileIO.flist(*fglob)) if not files: raise ExperimentError("No files found matching glob '{0}'".format(fglob)) return fromFiles(files)