Python CGI - outputting to textarea

LarsenMTL larsmtl at yahoo.com
Mon Oct 11 17:18:26 EDT 2004


I have a long running python cgi which in the end returns a link to a
pdf file. While it runs it generates a log that uses stdout right into
the html.  I use the sys.stdout.flush() to make this log output
relatively realtime.

The log, however, has grown too long.  I wish to output it instead
into a textarea.  I thought I could just use the textarea tags before
the output starts.  This works, but my output is no longer "real time"
even with the flush (it waits till I close the textarea tag to display
it).  Anyone know a method how I can make it write to the textarea as
it goes?

Thanks,

Mark



More information about the Python-list mailing list