version 0.7.0a of Python Server Pages

Jon Brisbin mail at jbrisbin.net
Wed Sep 27 10:41:23 EDT 2000


Quite a few have already perused and downloaded my new project Python
ServerPages ( http://www.jbrisbin.net/PythonServerPages ) and several have
asked "what's the difference between this and all those other packages??"
In a word: simplicity :-)  One CGI script (which can be integrated with your
mod_pyapache, mod_snake, etc...) parses your embeded Python code...here's an
example of how easy it is to develop a PSP page:

<body>
[$ if Form.has_key("variable"): $]
  <h1>Hello [+Form.variable+]</h1>
[$ endif $]
<hr>
[-
def myFunc(self, param):
    return "foo" + string.toupper(param)
-]
<hr>
[+myFunc("stuff")+]<br>
You are connecting from: [+Request.remote_addr+]
<hr>
<!-- Include another PSP page -->
[-Page.process("/full/path/to/file.pyml")-]

notice no importing of commonly used pkgs?? :-)  os,sys,string,cgi, etc...

Since it's still (for just a little while anyway) considered alpha, you'll
probably find bugs...and I haven't had a chance to get the CVS on the
sourceforge site up and going yet, so everyone can contribute their bug
fixes and feature additions...until then, patches are welcome! :-)

the [-include("file.html")-] function is only file-based right now, but I'm
adding the virtual capability right now...and as of v0.7, the
Request.show_env() and Page.view_source() functions makes debugging a little
easier...

I hope this can be useful to others...I've found my Python ServerPages quite
useful for myself...now if I could just find a Python-friendly web hoster
that offered everything I've got now! ;-)

You can download Python ServerPages at
http://www.jbrisbin.net/PythonServerPages

--


Jon Brisbin
www.jbrisbin.net

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Email:  mail at jbrisbin.net
eFax.com Fax/Voice mailbox:  208.545.5368
PGP public key: http://www.jbrisbin.net/pgpkey.shtml
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++






More information about the Python-list mailing list