Add render for rdExpression

This commit is contained in:
lafrite 2014-11-13 17:53:23 +01:00
parent a84b04bcf7
commit a993c27577

View File

@ -10,6 +10,9 @@ from path import path
from texenv import texenv from texenv import texenv
from pymath.random_expression import RdExpression from pymath.random_expression import RdExpression
RdExpression.FORM = "raw"
def main(options): def main(options):
#template = report_renderer.get_template(options.template) #template = report_renderer.get_template(options.template)
template = texenv.get_template(options.template) template = texenv.get_template(options.template)
@ -39,6 +42,7 @@ def main(options):
output = output.name output = output.name
for infos in list_infos: for infos in list_infos:
#print("_______" + str(infos))
dest = path(str(infos['num']) + output) dest = path(str(infos['num']) + output)
with open( dest, 'w') as f: with open( dest, 'w') as f:
f.write(template.render( RdExpression = RdExpression , infos = infos)) f.write(template.render( RdExpression = RdExpression , infos = infos))