[mod_python] psp include syntax

Nicolas Lehuen nicolas at lehuen.com
Fri Feb 24 10:17:47 EST 2006

Hi Emlyn,

Since you wrote a ServerObject abstraction interface, why not try to
abstract the file inclusion into it, and forget about using the native
syntax ? I don't think it is possible to do anything about your
problem as is...


2006/2/24, Emlyn Jones <emlynj at gmail.com>:
> Hello,
> I've written a web app which uses mod_python on Apache. I now need to
> make it work using Python/ASP and IIS (using Mr Hammonds excellent
> Python Win32 package) so I've wrapped everything up into a
> ServerObject hiding the underlying implementation and making my pages
> "pure" python. The only remaining problem is including other files. As
> you know the include directive for mod_python is this:
> <%@ include file="scriptheader.asp"%>
> Where as for IIS/ASP it is this:
> <!--#include file ="scriptheader.asp"-->
> IIS barfs at the mod_python syntax and mod_python ignores the IIS
> syntax. Other than hacking the mod_python source code, can anybody
> think of a nifty way to make the includes work on either platform?
> (I realise this may be an impossible dream, but you never know).
> Cheers,
> Emlyn.
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://mailman.modpython.org/mailman/listinfo/mod_python

More information about the Mod_python mailing list