Native Python Server Pages - mod_psp

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


Hi,

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
http://www.edwardbear.org/blog/archives/000108.html

Sample code:

<?psp
import time

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

-Sterling

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