views:

1165

answers:

2

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.

+3  A: 

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!

Jacob Feisley
And it works a treat. Well done that man.
ConcernedOfTunbridgeWells
A: 

Thanks a lot Jacob, Works perfectly on my XP with active python 2.6

anon