Python CGI - outputting to textarea
Michael Foord
fuzzyman at gmail.com
Tue Oct 12 11:12:31 EDT 2004
larsmtl at yahoo.com (LarsenMTL) wrote in message news:<99351542.0410111318.533188f0 at posting.google.com>...
> 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
Using javascript to read the data and insert it into the text box,
with a regular refresh sounds like the way forward. *OR* close a
textarea tag every few k of text and start a new box....
Regards,
Fuzzy
http://www.voidspace.org.uk/atlantibots/pythonutils.html
More information about the Python-list
mailing list