Pimping the 'cgi' module
fredrik at pythonware.com
Fri Nov 24 15:39:13 CET 2006
Christoph Haas wrote:
>> well, note, for that they have named it Ruby-On-Rails, so its still the
>> language - leveraged. While it is Zope/Django/Ego-on-Python ... ?
> If by that you mean that neither Zope nor Django are exactly pythonic I
> think I concur.
Django is highly Pythonic (it's pure Python plus templates, and has the same
"pencil-like qualities" as Python itself). Zope 3 is highly Pythonic too, but a
rather more advanced form of Python. but they're both application servers,
not CGI scripting environments.
>> First need of course: an update of that cgi "module".
> Oh, yeah. I just joined the Web SIG and found out that WSGI seems the way
> to go. At a first look it seems horrible if you just want to provide a CGI
WSGI is a CGI replacement, not a CGI implementation. Which is a good thing,
because what really matters, if you think about what a web server is doing, is the
HTTP protocol, not an old and not always practical httpd extension standard.
WSGI simply provides plumbing for working very close to the HTTP level.
(you can of course create a WSGI-compatible adapter for CGI in no time at
all, but that's not really the point of WSGI).
> Somehow I sadly feel I would just add another incomplete framework to that
as they say, if you don't understand history, you're bound to repeat it ;-)
> I'm especially unsure whether it's good or bad to create another "I'm sick
> of the standard library"-style module. I've just become a bit less
> confident to actually contribute something useful there. Overwhelming.
Building a "like cgi.py, but with more support for the kind of things people actually
need" library would be an excellent idea. It's not clear from your posts that you
"get" what things like Django and Zope do, and how that's different from "CGI
programming", but if you have a deep understanding of the latter, I'm sure you
could come up with a nice "cgi2.py" library with relatively little effort. Get to
More information about the Python-list