Include statements with python scripting

Sean Robertson seanr at infi.net
Fri Jul 30 17:18:45 EDT 1999


William Tanksley <wtanksle at dolphin.openprojects.net> wrote in message
news:slrn7q44ck.8kv.wtanksle at dolphin.openprojects.net...
> On Fri, 30 Jul 1999 15:24:38 -0400, Sean Robertson wrote:
> >How do you do an include statement in python?  I know that in Cold Fusion
it
> >would be "<cfinclude template="blue_header_noad.html">" and in an shtml
file
> >it would be "#include
http://data.pilotonline.com/connect2/blue_header.html"
> >but I need to know how this is done in Python scripting.  This script is
> >being embedded in a template for a classifieds page.  I have something
like
> >this so far:
>
> ><html><head><title><!--#var name--> Search Results</title></head>
>
> This isn't Python -- I'm sure you're trying to ask about Zope.  Remarkable
> product, written in Python (lovely plumage).  But not Python.  Try
> visiting www.zope.org for more info.
>
> >    <!--#include http://data.pilotonline.com/connect2/blue_header.html-->
>
> I wasn't aware of a #include in Zope; I've been using #var.  Generally
> speaking, it doesn't make any sense to include an entire HTML page inside
> another, so I think you might possibly be confused.

I was told that the program that uses this template uses python, but am
checking out zope nonetheless.  The reason I need to include and external
html fragment is that I want the page to have two seperate interfaces
depending on which part of the site the user is coming from.  If they are
searching CareerConnection, the mainclass variable will be Employers and the
results page needs to fit the interface of the CareerConnection site,
otherwise, they should get the old default interface.  I was using
"#include" only as a placeholder until I figured out how to do it in python.
If you know how, please let me know.






More information about the Python-list mailing list