On Mon, Jul 12, 2010 at 4:59 PM, lkcl <luke.leigh...@gmail.com> wrote: > for several reasons, i'm doing a cooperative multi-tasking HTTP > server: > git clone git://pyjs.org/git/multitaskhttpd.git > > there probably exist perfectly good web frameworks that are capable of > doing this sort of thing: i feel certain that twisted is one of them. > however, the original author of rtmplite decided to rip twisted out > and to use multitask.py and i'm one of those strange people that also > likes the idea of using 900 lines of awesome elegant code rather than > tens of thousands of constantly-moving-target. > > one of the things that's slightly unfortunate is that i'm going to > have to copy SimpleHTTPServer.py and slightly modify it; > CGIHTTPServer.py as well. this is Generally Bad Practice. > > can anyone think of a way of monkey-patching or otherwise using > SimpleHTTPRequestHandler and CGIHTTPRequestHandler and overriding the > base class from which those two are derived? > > i have had to pull bits out of BaseHTTPRequestHandler to make them use > the "yield" logic of multitask.py already, which was painful enough. > > ideas, anyone? > > l.
I may not be fully understanding what you're doing, but is there a reason that one of the mixins can't be used? Geremy Condra -- http://mail.python.org/mailman/listinfo/python-list