Thursday, January 5. 2006Conditional SIGHUP supportTrackbacks
Trackback specific URI for this entry
No Trackbacks
Comments
Display comments as
(Linear | Threaded)
Is there more documentation, or a wiki, for flup? I'm having trouble figuring out the middleware and publisher pieces, and they look quite interesting.
sam@caveman:~/projects/tmp/moult/learning/flup$ cat middleware.py from flup.middleware.session import MemorySessionStore, SessionMiddleware from flup.middleware.gzip import GzipMiddleware from flup.middleware.error import ErrorMiddleware def myapp(environ, start_response): session = environ['com.saddi.service.session'].session count = session.get('count', 0) + 1 session['count'] = count start_response('200 OK', [('Content-Type', 'text/plain')]) return ['You have been here %d times!\n' % count] sessionStore = MemorySessionStore() app = SessionMiddleware(sessionStore, myapp) app = GzipMiddleware(app) app = ErrorMiddleware(app, 'wsgi-admin@example.com') if _name_ == '_main_': from flup.server.ajp import WSGIServer WSGIServer(app).run() sam@caveman:~/projects/tmp/moult/learning/flup$ python2.4 middleware.py Traceback (most recent call last): File "middleware.py", line 18, in ? app = ErrorMiddleware(app, 'wsgi-admin@example.com') File "/usr/lib/python2.4/site-packages/flup-0.5-py2.4.egg/flup/middleware/error.py", line 156, in _init_ applicationName.append(application._name_) AttributeError: 'GzipMiddleware' object has no attribute '_name_' Sadly, no, there is no documentation, nor is there a wiki. There's only the (rather copious, I hope) docstrings within the source and the few sparse examples.
And I think you've uncovered a bug, either in ErrorMiddleware or my example. I'll have to look at it. I just packaged flup as an RPM for my Fedora machines and I was wondering what to put in the "License" field of the .spec file... nowhere on your site or in the tarball did I see mention of a license.
-al It's a standard 2-clause BSD license, just have a look at any of the .py files. Sorry if it isn't more prominent.
|
LinksCalendarQuicksearchCategoriesBlog Administration |