Re: twisted
Steven Armstrong <[email protected]>
| Newsgroups | gmane.comp.web.pyblosxom.devel |
|---|---|
| Message-ID | <[email protected]> |
On 03/29/05 21:54, Blake Winton wrote: > 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?) > Good idea. I've hacked my local copy of pyblosxom.cgi to work just like that. I'll commit it after a few more tests. > 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. > Why? If the user doesn't need/want the WSGI stuff he shouldn't be forced to use it. After all it's another layer of code that can contain errors and consumes CPU, memory and time. I agree that WSGI is important for Python web programming. Altough for me it doesn't really go far enough. I'ld prefer something like the Java Servlet spec, that is, a less bloated and pythonized variant. There's still so meny things missing in WSGI, like session handling and all. This is is one section where Pythons batteries are missing. ------------------------------------------------------- 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