%@ page imports = "sys,os,time"%> <%@ page method="writeContent" %> <%@ page extends="ExamplePage"%>
This is a sample page for an implementation of Python Server Pages (PSP).
The syntax for Python Server Pages is almost identical to that of Java Server Pages (JSP). Just the scripting language is different! And obviously better. In fact, just about anything you can do with JSP, you can do with PSP, and more. The only thing the current implementation is missing is Beans, and we'll top that shortly. In the meantime, with PSP, not only can you create template text that will be inerted in one method when the page is run as a servlet, but you can choose which base class to inherit from, you can choose which method of the base class to over-ride with your template text, and you can add additional methods to the servlet class, all from the PSP template code.
I know, Cool, huh?
The text below comes from another jsp page which was inserted into this one with the <%@ incude %> directive.
There are two ways to insert the contents of another file into a PSP page:
This works only under Unix:
| ' + str(i) + ' |
| ' + req.pathInfo() + ' |
You passed a %s
' % val)