[Zope3-dev] PEP 333 and Zope
Eckart Hertzler
eckart at hertzler.de
Tue Nov 9 09:13:55 EST 2004
On Tuesday 09 November 2004 14:46, Jim Fulton is believed to have said:
> Eckart Hertzler wrote:
> > Hallo,
> >
> > I am by no means a zope server guru - far from it.
> > But the WSGI specification seems to be a good thing, so I
> > decided to try just how hard it would be to convert Zope3
> > to a WSGI application.
> >
> > It proved to be quite easy : gere is a link to a Zope3 server running
> > on Phillips WSGI reference server :
> >
> > http://lentix-consulting.com:8090/
>
> The connection is refused to me.
>
Should work now.
>
> > It is just a pre proof of concept.
> >
> > I introduced a WSGI server type which starts the WSGI reference server as a zope ServerType
> > and uses the HTTPPublicationRequestFactory as is.
> >
> > The entire source code is as follows :
>
> I don't really have time to look at this right now, but Yay! :)
>
> Are you a contributor? If so, why not check this in?
> For now, given the dependence on zope.app, I sugest zope.app.wsgi.
>
I am a contributor.
So I could check it in.
However, since it uses philips refernence implementation it has a dependency to
this (external) module which is in the PEAK repository.
Do you really want this as part of zope.app ?
> If not, why not become one? :)
>
> > [snip]
> > from string import split, strip
>
> The string module is deprecated.
>
>
> > from StringIO import StringIO
>
> cStringIO is faster.
>
> > from zope.interface import implements
> > from zope.publisher.publish import publish
> > from zope.server.http.httpserver import HTTPServer
> > from zope.server.interfaces import IHeaderOutput
> >
> > from zope.app.publication.httpfactory import HTTPPublicationRequestFactory
> > from zope.app.server.servertype import ServerType
> > from zope.server.http.commonaccesslogger import CommonAccessLogger
> >
> > from thread import start_new_thread
> >
> > from wsgiref.simple_server import WSGIServer, WSGIRequestHandler
> >
> > class WsgiHeaderOutput(object):
> >
> > implements(IHeaderOutput)
> >
> > def __init__(self):
> > self._headers = {}
> > self._accumulatedHeaders = []
> > self._statusString = ""
> > self._headersSent = False
>
> Hm, this is odd. tabs?
>
> ... no time now to study this.
>
> Great start!
>
> Jim
>
More information about the Zope3-dev
mailing list