[mod_python] psp include directive

David Bear David.Bear at asu.edu
Tue May 23 15:15:35 EDT 2006


I am using publisher to dispatch different psp pages.

When I use the include directive in the psp page I get an quoting
error -- 

here is a snippet of the psp code that throws the error:
=============
        <td width="30%">
    <div id="contactBlock"><%@ include file='contact_body.html' > </div>
    <div id="useabilityNotes"><%@ include file='useabilityNotes.html' > </div>
        </td>
===================

the error traceback is 
===================
Mod_python error: "PythonHandler mod_python.publisher"

Traceback (most recent call last):

  File "/usr/lib64/python2.4/site-packages/mod_python/apache.py", line
299, in HandlerDispatch
    result = object(req)

  File "/usr/lib64/python2.4/site-packages/mod_python/publisher.py",
line 136, in handler
    result = util.apply_fs_data(object, req.form, req=req)

  File "/usr/lib64/python2.4/site-packages/mod_python/util.py", line
361, in apply_fs_data
    return object(**args)

  File "/work/servers/www/htdocs/apep/index.py", line 80, in index
    return _any_page(req, MAINTEMPLATE )

  File "/work/servers/www/htdocs/apep/index.py", line 107, in
_any_page
    return psp.PSP(req, main_template, vars=vars)

  File "/usr/lib64/python2.4/site-packages/mod_python/psp.py", line
111, in __init__
    self.load_from_file()

  File "/usr/lib64/python2.4/site-packages/mod_python/psp.py", line
177, in load_from_file
    code = compile(source, filename, "exec")

  File "/work/servers/www/htdocs/apep/templates/main_template.html",
line 27

    req.write("""
   
   ^ SyntaxError: EOF while scanning triple-quoted string 

=======================
I'm about to kill this --- are single quotes in directives not
allowed?




-- 
David Bear
phone: 	480-965-8257
fax: 	480-965-9189
College of Public Programs/ASU
Wilson Hall 232
Tempe, AZ 85287-0803
 "Beware the IP portfolio, everyone will be suspect of trespassing"


More information about the Mod_python mailing list