cgi integration question 2
ken at hotmail.com
Mon Oct 21 00:02:52 CEST 2002
"Gerhard Häring" <gerhard.haering at gmx.de> wrote in message
news:slrnar5o1l.162.gerhard.haering at lilith.my-fqdn.de...
> Ken wrote in comp.lang.python:
> > "Gerhard Häring" <gerhard.haering at gmx.de> wrote:
> >> Frankly, sleeping in the context of synchronous IO doesn't make any
> >> sense.
> > Hi, I think my problem here is that the backend program can't output
> > and I got an empty list in return. Does lines = inf.readlines() actually
> > wait for the backend program to finish execution before proceeding to
> > inf.close() ?
> Yes. I believe the backend program closing stdout qualifies, too.
> Anybody else can say for sure?
> > I find it very strange that when I compile using python
> > scriptfile.cgi in telnet environment, it works fine, but when I put
> > on the web browser, the list is empty. Do you know how I can fix
> > this problem?
> Not without further information. What do the log files of the web
> server tell you? (called /var/log/apache/error.log or similar on
> Apache). Have you tried to enable tracebacks using the cgitb module?,
> e. g.
> import cgi, cgitb
> [rest of your CGI script here]
> -- Gerhard
Hi, there isn't such module call cgitb
Traceback (most recent call last):
File "chessboard.cgi", line 7, in ?
import os, cgi, cgitb
ImportError: No module named cgitb
The python code is here:
The C++ test code is here:
What did I do wrong to constantly get that broken pipe error?
Traceback (most recent call last): File
"/usr/cs3/keho/lib/html/comp3204/chessboard.cgi", line 143, in ?
outf.close() IOError: [Errno 32] Broken pipe
More information about the Python-list