This is what I usually do to render a file with pystache:
txt = open(filename, 'r').read()
print pystache.render(txt, context).encode('utf-8')
(“context” is my mapping)
But now I have to render very big templates. Is there a suggested way to do
this, without reading the whole template into memory? Does pystache have internal support for this?
At the time of this writing, there is an issue open on the github page about this. As soon as I get time to follow this I will.