web status display for long running program
Paul Rubin
http
Thu Feb 24 22:05:24 EST 2005
brian at mirror.org (Brian Roberts) writes:
> - I don't want to embed a full web server into the application or
> require any special PC setup.
That's not a big deal, just use the standard library's http server class.
> - I think I know how to listen on a socket, but not sure how to send
> stuff to to a web browser -- just start with <HTML>? Or like a CGI
> script with the header stuff like text/html? (I don't care if I have
> to write the HTML by hand or can use a toolkit -- not important).
You'd have to send a full http response, but the http server class
does some of it for you.
> - Do I need a separate thread to listen and send the HTML? The
> application is currently single threaded. I'm confortable with
> threads, but would prefer to avoid them if possible.
Separate thread is the obvious way to do it.
More information about the Python-list
mailing list