Native Python Server Pages - mod_psp
Gregory (Grisha) Trubetskoy
grisha at apache.org
Mon Mar 24 17:45:43 EST 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.
Grisha
On 17 Mar 2003, Sterling Hughes wrote:
> 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