def make_template_info(filename, root_dirs):
 return Template(filename, [filename[(len(d) + 1):] for d in root_dirs if filename.startswith(d)])

def make_template_info ( filename , root_dirs ) : return Template ( filename , [ filename [ ( len ( d ) + 1 ) : ] for d in root_dirs if filename . startswith ( d ) ] )
creates a template object for a filename .