Valhalla Legends Forums Archive | Web Development | Beta release of my framework

AuthorMessageTime
St0rm.iD
http://st0rm.hopto.org/pwa-project.zip

Make sure you have python 2.3 installed, at www.python.org. It would be helpful to know Python, but here is a quick example "Hello World" type of thing:

[code]
import pwa

class Hello(pwa.Controller):
def handle(self, req, name="St0rm"):
req.write("Hello, " + name)

class Goodbye(pwa.Controller):
def handle(self, req, name="St0rm"):
req.write("Goodbye, " + name)

controller = Hello()
goodbye = Goodbye()
[/code]

Try saving this as hi.pwa, and visiting the urls:
hi.pwa
hi.pwa?name=hax0r
hi.pwa/goodbye
hi.pwa/goodbye?name=hax0r

You get full session variable support by using req.session (a dictionary). There's many more features; once people (hopefully) install it and start playing with it, I'll show you some of the cooler things.
December 22, 2003, 5:34 AM

Search