Strange behavior with os call in cgi script

Fredrik Lundh fredrik at pythonware.com
Mon Feb 6 07:30:30 EST 2006


Rene Pijlman wrote:

> But I do think that adding logging to a cgi script is a sensible thing to
> do for a beginner. Getting that to run in a debugger is probably way more
> complicated.

on the other hand, adding

    if 1: # set to 0 when deploying
        print "<pre>"
        print cgi.escape(repr(os.environ))
        print "</pre>"

to the CGI script isn't that hard... (if you're willing to do "view source" in
the browser, you can skip the <pre> and cgi.escape() stuff...)

</F>






More information about the Python-list mailing list