Chris McAvoy wrote:
> Hi All,
> I recieved a response to my initial request, but need to clarify a
> bit. Is anyone running a straight WSGI app with WSGIkit?
> Something along the lines of the example from the PEP:
> def simple_app(environ, start_response):
> """Simplest possible application object"""
> status = '200 OK'
> response_headers = [('Content-type','text/plain')]
> start_response(status, response_headers)
> return ['Hello world!\n']
Well, if you want to run *that* example, call it "application" and put
it in a module, and WSGIKit (wsgikit.urlparser in particular) will load
it up and run it. It looks for "application" as a WSGI application, or
an object with the same name as the module, which it calls with no
arguments and is expected to return a WSGI application (this is how
Webware servlets work).
I don't know how much actually speaks WSGI directly like that example.
It's kind of tedious, so you'll make libraries, and the libraries become
a framework, and then there you are, you're coding in your new framework
X. If you create a subclass of wsgikit.webkit.wkpage.Page, you've
created a WSGI application, it just also happens to be a Webware servlet.
Ian Bicking / ianb@... / http://blog.ianbicking.org