Template class as written in the manual:from mako.template import Template mytemplate
mytemplate = Template("hello world!")
print mytemplate.render()
C:\Documents and Settings\User>cd C:\py\project\vendor\template\Mako_73 // cd to where I unpacked MakoC:\py\project\vendor\template\Mako_73>python // run Python interpreter
>>> from mako.template import Template // trying to import and getting an error
Traceback (most recent call last):File "<stdin>", line 1, in <module>File ".\mako\template.py", line 622exec code in module.__dict__, module.__dict__
^SyntaxError: invalid syntax
What can it be? I couldn't find anything in Google about this error.
I'm using Python 3.3.
I've downloaded Mako-0.7.3 as tar.gz file and just unzipped it inC:\py\poject\vendor\template\Mako_73. I do not have this directory in the PYTHONPATH or paths.pth. C:\py\poject is a directory where my Django project lives and in \vendor\template I've decided to put Mako and import it from there.
The same question on Stackoveflow.
exec code in module.__dict__, module.__dict__
^