Jim Gallacher
jpg at jgassociates.ca
Tue Jun 6 12:03:37 EDT 2006
Julien Cigar wrote: > I found the problem. > The problem was that I have to put a relative path in place of an > absolute path ... Interesting. I'm not sure if this is a know problem, but I'll investigate it as segmentation faults suck. > Another question about the include directive, why can't I do: > mytemplate.run({'body' : 'invasive/list.psp'}) > > and in my template file : > <%@ include file="<%= body %>"%> > > This doesn't work .. any idea ? I assume it's a limitation of the parser but I don't know if this use case has come up before. I'm not sure how easy it would be to tweak the parser to work recursively or if it's worth the effort. Others are of course free to investigate. :) As an alternative you could do: body_template = psp.PSP(req, filename="list.psp") mytemplate.run({'body' : body_template}) Jim > Jim Gallacher wrote: >> Julien Cigar wrote: >>> Hello, >>> >>> Any idea what could make Apache2 segfaulting when I have an: <%@ >>> include file="/foo/bar/views/lol.html" %> in a PSP template ? >>> >>> [Tue Jun 06 14:21:35 2006] [notice] child pid 28455 exit signal >>> Segmentation fault (11) >>> >>> If I remove the <%@ include %> statement, everything work fine. >>> >>> (mod_python 3.2.8, apache 2.0.55) >> >> Is lol.html just html, or does it contain python or psp code as well? >> >> Does lol.html parse correctly on its own? You can test it in a command >> line interpreter: >> >> from mod_python import _psp >> >> code = _psp.parse('lol.html') >> print code >> >> Jim >> > >
|