Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using Cheetah Templating system with windows and python 2.6.1 (namemapper problem)

So I am trying to use the Cheetah templating engine in conjunction with the Django web framework, and that is actually working fine. I did some simple tests with that and I was able to render pages and whatnot.

However, problems arise whenever doing anything other than using very simple variable/attribute/methods in the Cheetah templates. It gets mad and says: You don't have the C version of NameMapper installed! I'm disabling Cheetah's useStackFrames option as it is painfully slow with the Python version of NameMapper. You should get a copy of Cheetah with the compiled C version of NameMapper. "\nYou don't have the C version of NameMapper installed! "

And then it will be unable to find whatever attribute or method I was trying to call inside the Cheetah template.

I attempted to download the C version of Namemapper and install it, but I wasn't sure how to 'install' a .pyd file (when I looked up '.pyd' files on the web it said they are just dynamic python modules that can be used with an import statement). Additionally, the Cheetah website only has C versions of Namemapper for python 2.4 and 2.5, while I am using python 2.6.1, so that is probably an issue as well.

Does anyone have a solution for this? Thanks.

like image 241
Daniel Waltrip Avatar asked Jul 20 '09 18:07

Daniel Waltrip


1 Answers

I have compiled the PYD file for Python 2.6 as well as Windows installers that have it bundled in, so that users don't have to figure out where to drop the PYD on Windows.

Installers: http://feisley.com/python/cheetah/ (pyd files are in the /pyd folder)

Hope this helps!

like image 194
feisley Avatar answered Nov 16 '22 14:11

feisley