cubicweb/ext/tal.py
changeset 12825 71a842bdf81d
parent 11767 432f87a63057
equal deleted inserted replaced
12824:bc623a3e44e9 12825:71a842bdf81d
   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 = open(filepath)
   209     fp = open(filepath)
   210     file_content = unicode(fp.read()) # template file should be pure ASCII
   210     file_content = str(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 
   215 def evaluatePython (self, expr):
   215 def evaluatePython (self, expr):