You are not logged in Log in Join
You are here: Home » Members » Ioan's Zope Documents » Zope Python Script Server Pages » swpackage_view

Log in
Name

Password

 
 

Zope Python Script Server Pages

Convert on the fly plain text document into python scripts before to view it.

Who knows jsp will feel confortable with this product.

This product is NOT http://spyce.sourceforge.net/
This product is NOT http://www.ciobriefings.com/psp/
This product has nothing to do with any other PSP (Python Server Pages) engine.
It may work like ASP or JSP or PSP but is just a small test.
Personally I wanted to see how is to convert text
with html tags into a Zope python script.

You write your document with html-text and python code;
then the result is a generated python script
which will be executed each time you view the document.

Sample script

This sample will list all psp files with title not empty from current folder:
<%=self.standard_html_header(self)%>
<h1>Links</h1>
<ul>
<%
for id,ob in self.objectItems(["Python Server Page"]):
   title = ob.title
   if title!="": print "<li><a href=%s>%s</a>" % (ob.absolute_url(),title)
%>
</ul>
<%=self.standard_html_footer(self)%>

About Code

self=context.REQUEST.PARENTS[0]
self is the context where the object is executing

Latest Release: 1.0
Last Updated: 2003-02-13 04:56:47
Author: Ioan
Categories: Component Developer, Content Object, Developer
Maturity: Stable

Available Releases

Version Maturity Platform Released
1.0 Stable   2003-02-13 04:56:47
  psp.zip (199 K) All