cgi integration question 2
gerhard.haering at gmx.de
Sun Oct 20 18:56:22 CEST 2002
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
> Hi, I think my problem here is that the backend program can't output ontime
> 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?,
import cgi, cgitb
[rest of your CGI script here]
More information about the Python-list