Native Python Server Pages - mod_psp
Gregory (Grisha) Trubetskoy
grisha at apache.org
Mon Mar 24 23:45:43 CET 2003
Nice module (even though I'm probably in the "latter group") - I
especially like that it uses flex - it must be pretty fast.
It seems it could be fairly easily integrated with mod_python - if
functionality provided by psp_parser_gen_pycode() was available as a
standalone Python module this could be turned into a mod_python handler
with just a few lines of code.
If you think this is an interesting idea we could bounce it around on
python-dev at httpd.apache.org.
P.S. I also like the license.
On 17 Mar 2003, Sterling Hughes wrote:
> 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