Native Python Server Pages - mod_psp

Sterling Hughes sterling at
Mon Mar 17 19:47:40 CET 2003


I've created a new Apache module, which provides a "native"
implementation of Python server pages, as well as providing an apache
api (and helper functions for accessing get and post values).  The basic
idea can be summarized as "PHP ideology with the Python Language."

More information can be found at

Sample code:

import time

name = request.get_value("name")
if name == None:
        name = "World"
<title>Hello <?=name?></title>
<h1>Hello <?=name?> it is now <?=time.strftime("%Y-%m-%d, %H:%M")?></h1>
if name == "World":
        <form method="GET">
        What is your name? <input type="text" name="name">


PS: So far I've had two sets of responses, either "that rocks!" or "ohh
god no!"  If you fall in to the latter group, I apologize in advance. ;)

"People can have the Model T in any colour -- so long as it's black." 
    - Henry Ford

More information about the Python-list mailing list