def get_sweep(file): global known_sweeps if not is_image_name(file): return try: template, directory = image2template_directory(file) key = (directory, template) if not known_sweeps.has_key(key): sweeplist = SweepFactory(template, directory) known_sweeps[key] = sweeplist except exceptions.Exception, e: print 'Exception: %s' % str(e)
def rj_find_matching_images(image): template, directory = image2template_directory(image) images = find_matching_images(template, directory) return images
def rj_get_template_directory(image): template, directory = image2template_directory(image) return template, directory