[mod_python] Using a psp parser from outside mod_python

Mamading Ceesay mamading at gmail.com
Thu Jun 23 13:33:45 EDT 2005


On 6/23/05, dharana <dharana at dharana.net> wrote:
> 
> If I try to:
> 
>         from mod_python.psp import PSP
> 
> from a cmdline python script I get "ImportError: No module named _apache". I'm
> dynamically generating psp templates (mixes of xhtml and <% %> tags) that need
> to be parsed into full xhtml from a non-apache env. Is there any possibility of
> using PSP this way?
> 

Do you really need PSP, or can you not use something like PyHP
http://www.freenet.org.nz/python/pyweb/docs/pyhp.html ?

Personally, I've used Cheetah to generate templates from the command line.

-- 
Mamading Ceesay

"You never change things by fighting the existing reality. To change 
something, build a new model that makes the existing model obsolete." 
-- R. Buckminster Fuller



More information about the Mod_python mailing list