1.1 --- a/examples/WSGI/CalendarApp.py Thu Dec 02 16:39:50 2004 +0000
1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
1.3 @@ -1,25 +0,0 @@
1.4 -#!/usr/bin/env python
1.5 -
1.6 -from WebStack.Adapters import WSGI
1.7 -from Calendar import DirectoryResource
1.8 -from wsgiutils import wsgiServer, wsgiAdaptor
1.9 -
1.10 -# Magic dictionary for WSGIServer.
1.11 -
1.12 -class MagicDict:
1.13 - def __init__(self, handler):
1.14 - self.handler = handler
1.15 - def has_key(self, name):
1.16 - return 1
1.17 - def __getitem__(self, name):
1.18 - return self.handler
1.19 -
1.20 -# Special magic incantation.
1.21 -
1.22 -handler = WSGI.WSGIAdapter(DirectoryResource())
1.23 -address = ("", 8080)
1.24 -server = wsgiServer.WSGIServer(address, MagicDict(handler))
1.25 -print "Serving..."
1.26 -server.serve_forever()
1.27 -
1.28 -# vim: tabstop=4 expandtab shiftwidth=4