from multiprocessing import Pool def getface(imagefile): pool=Pool() pool.map(getface,zip(oldpaths,newpaths))