[Python-Dev] Re: cgitb.py for Python 2.2

Ka-Ping Yee ping@lfw.org
Tue, 31 Jul 2001 18:23:39 -0700 (PDT)


On Tue, 31 Jul 2001, Guido van Rossum wrote:
> Why not add this to cgi.py instead?

Because that would seem to defeat most of the point.

The point was to provide an instant, effortless improvement for all
of the Python CGI scripts out there.  If programmers have to manually
edit all of their CGI scripts to insert

    import sys, cgitb
    sys.excepthook = cgitb.excepthook

then it's just as annoying as inserting

    import sys
    sys.stderr = sys.stdout

I don't want people to have to edit every single script.

> I don't like new additions that are
> irrelevant for most apps (CGI is a tiny niche for Python IMO).

I think this is where our perceptions differ.  I think of CGI as
the application that totally "made" Perl, and as the quickest, easiest
way that many beginners get early payoff from a scripting language.
My impression is that it has been a big "hook" for bringing people to
Perl and Python -- it's the shortest path to building and deploying
something useful to a huge and unlimited audience.

Wouldn't you say there are more Python CGI programmers out there
than, say, Zope developers?  Or think of it like this: what fraction
of Web developers are CGI programmers, and what fraction of those
use Python?

Maybe i'm wrong?  I welcome more opinions from others -- how do you
see people coming to Python?  What's the first "real" thing they do
with Python that motivates them to try it?


-- ?!ng