Strange python and cgi!

Tim Roberts timr at probo.com
Wed Sep 25 02:07:11 EDT 2002


"CheapSkate" <gua81 at XXXyahoo.com> wrote:

>Hi I made a cgi script in python and successfully compiled it.
>
>the script is some thing like this
>
>#! usr/lib.../python
>
>import ...
>def kickass(xxx)
>...
>
>...
>print "<pre>"
>kickass(xxx)
>print "</pre>
>...
>
>when I go to the webpage, it stops halfway and in "view source: it only show
>the code till the open "pre".
>however when I output it to an html file:
>python nameofscript.cgi >app.html
>....
>app.html works fine just as I want it to be.
>
>What seems to be the problem here.

Does "kickass" read or write any files?  Remember that the web server runs
as a special and unprivileged user.

If you are running Linux, check the log file at /var/log/httpd/error-log.
--
- Tim Roberts, timr at probo.com
  Providenza & Boekelheide, Inc.



More information about the Python-list mailing list