[mod_python] Include directive with variable for filename

Roman Gaufman hackeron at gmail.com
Sun Dec 9 23:03:58 EST 2007


Dear mod_python mailinglist,

I'm trying to do:

  <%@ include file=filename %>

filename being a variable defined earlier as code but it won't work  
unless I use a string for file.

I also tried string formatting:

<%@ include file="%s" % filename %>

Which throws an exception :(

Is there any work around to pass a variable to the include directive?

Roman


More information about the Mod_python mailing list