Output from a CGI whilst running

F

Fuzzyman

I've written an an anagram generator.

(The desktop version is available for download from
http://www.voidspace.org.uk/atlantibots/nanagram.html !!)

The CGI version is at :
http://www.voidspace.xennos.com/nanagram-CGI.html

Although I had it working before - I think it needs tweaking again...
:-(

Anyway - all that is more or less irrelevant (isn't most of USENET ?)
- what I need to know is - how do I force the server to allow output
from the script *before* the script has finished outputting ?

The script sometimes takes a while to finish and I'd like it to
display results as it finds them, rather than waiting until I'd find
them all..........

The closest I could find was : (which of course is for Perl)

http://www.n3t.net/Programming/

For forcing a script to use Non Parsed Headers (for Apache only), use
this at the begining
of your script.
**note - this will let the cgi display it's output while running,
rather than waiting for the
whole thing to finish.

#!/usr/bin/perl
$| = 1;
print "$ENV{'SERVER_PROTOCOL'} 200 OK\n";
print "Server: $ENV{'SERVER_SOFTWARE'}\n";
print "Content-type: text/html\n\n";


Anyone know the way to achieve the same result under python ??

Fuzzyman

http://www.voidspace.org.uk/atlantibots/pythonutils.html
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,813
Latest member
lawrwtwinkle111

Latest Threads

Top