ext/tal.py
changeset 10614 57dfde80df11
parent 10590 7629902e7554
equal deleted inserted replaced
10613:8d9fe02387e3 10614:57dfde80df11
   204 def compile_template_file(filepath):
   204 def compile_template_file(filepath):
   205     """compiles a TAL template file
   205     """compiles a TAL template file
   206     :type filepath: str
   206     :type filepath: str
   207     :param template: path of the file to compile
   207     :param template: path of the file to compile
   208     """
   208     """
   209     fp = file(filepath)
   209     fp = open(filepath)
   210     file_content = unicode(fp.read()) # template file should be pure ASCII
   210     file_content = unicode(fp.read()) # template file should be pure ASCII
   211     fp.close()
   211     fp.close()
   212     return compile_template(file_content)
   212     return compile_template(file_content)
   213 
   213 
   214 
   214