[Web-SIG] Re: Regarding the WSGI draft

Ian Bicking ianb at colorstudy.com
Fri Aug 27 23:15:06 CEST 2004

Phillip J. Eby wrote:
> Well, if you can identify the top-level control point of PyBlosxom and 
> Roundup, you can always try converting them to WSGI.  But, maybe if 
> there's a stdlib module for WSGI utilities, a useful one would probably 
> be something to run some code in such a way that it thinks it's running 
> under CGI, even though it's really running under WSGI.  The degree to 
> which this could be assured is of course dependent on precisely what the 
> application *does*, but getting 80% of CGIs (that don't depend on some 
> kind of global state that isn't reset after each execution) to be able 
> to run in arbitrary WSGI servers would be a handy thing, and most 
> appropriate for the stdlib.

I happened to be playing with just such a thing:


There's a few parts I kind of punted on, though now that I think about 
it I know what I did wrong, so I'll fix it a bit this evening.  Anyway, 
it's intended to work both for multiprocess (e.g., mod_python) and 
threaded servers, with decreasing likelihood that any particular script 
will actually work.

But I haven't yet tested it under anything but CGI, so it really 
*should* work ;)  I'll try running it with your WSGIServer and see how 
it goes.

Ian Bicking  /  ianb at colorstudy.com  /  http://blog.ianbicking.org

More information about the Web-SIG mailing list