[mod_python] Re: Include directive with variable for filename

Roman Gaufman hackeron at gmail.com
Wed Dec 12 08:11:07 EST 2007


No one has any ideas/suggestions? :(

Roman

On 10 Dec 2007, at 04:03, Roman Gaufman wrote:

> 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