def template(filename, **locals):
path = '<STR_LIT>'.format(filename)<EOL>with open(path) as source:<EOL><INDENT>code = compile(source.read(), path, '<STR_LIT>')<EOL>global_vars = {'<STR_LIT:t>': t,<EOL>'<STR_LIT:f>': f,<EOL>'<STR_LIT:e>': e,<EOL>'<STR_LIT>': html.escape,<EOL>'<STR_LIT>': time.ctime}<EOL>exec(code, global_vars, locals)<EOL>return locals['<STR_LIT>']<EOL><DEDENT>
Returns