Re: twisted
Blake Winton <blake-dlUKtbW3TlBcVw/[email protected]>
| Newsgroups | gmane.comp.web.pyblosxom.devel |
|---|---|
| Message-ID | <[email protected]> |
Steven Armstrong wrote:
> On 03/29/05 19:10, Blake Winton wrote:
>>Okay, so, are we agreed that we can remove the pyblosxom.cgi, as it
>>should be logically equivalent to pyblosxom_wsgi.cgi? (And browsing
>>through the source, they look _extremely_ similar, which worries me as a
>>coder. Twice the chance to make mistakes.)
> The problem here is that pyblosxom_wsgi.cgi depends on the wsgiref
> library. I don't think users who only care about CGI should be forced to
> install that.
Well, how about changing the else case to:
try:
from wsgiref.handlers import CGIHandler
from wsgi_app import application
CGIHandler().run(application)
except ImportError:
p.run()
response = p.getResponse()
response.sendHeaders(sys.stdout)
response.sendBody(sys.stdout)
(obviously we'll need to add more in there, but the basic idea should be
solid, right?)
And just between us, I think I would be okay with forcing people to
install WSGI, or installing it for them, but that might just be because
I'm enamored of it now, and think that it's critical to the future of
Python on the web.
> On the other hand, pyblosxom_wsgi.cgi was ment to be another testcase
> for the wsgi-related code, not a replacement for pyblosxom.cgi.
But it's so close to being a replacement... :)
Later,
Blake.
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click