"Wrap" a python-cgi
Franz GEIGER
fgeiger at datec.at
Fri Mar 9 01:56:14 EST 2001
Have a look at Webware (currently 0.5). There's a lot more you can rely on
to make your "CGI life" easier...
Regards
Franz
"Hermann Himmelbauer" <dusty at strike.wu-wien.ac.at> wrote in message
news:3aa7c5f9$0$21482 at SSP1NO25.highway.telekom.at...
> Hi,
> I am currently using python for several cgi programs. One problem is that
> if my cgi-script has a bug it exits with an exception and the user gets an
> ugly error message done by the webserver.
>
> I would like to put some really simple "bugfree" (if something like this
> can exist :-) "wrapper" around my cgi-scripts, let it trap Exceptions, log
> the error and let it output a nice error page to the user.
>
> My first approach would perhaps be to wrap the whole script into a "try:
> except" clause but at first I don't know if nested try/except clauses are
> allowed and moreover the whole script looks somehow ugly as every line is
> indented.
>
> Perhaps you know a better solution?
>
> Best Regards,
> Hermann
>
> --
> ,_,
> (O,O) "There is more to life than increasing its speed."
> ( ) -- Gandhi
> -"-"--------------------------------------------------------------
More information about the Python-list
mailing list