[Zope] Buffering and flushing output

Tilo Renz tilo.renz@student.uni-ulm.de
Sun, 19 Aug 2001 02:49:40 +0200


> I would like to have the browser displaying something like this:
> 
>   [ Interrupt ]
>   Waiting Event X
>   Still waiting 1, 2, 3, 4, etc. etc.

Hi,

First you must instruct your web-browser to reload the site over and over again. You can achieve this by inserting <meta http-equiv="refresh" content="5; URL=http://www.xy.de/"> into the <head> of the page. With this command the browser will load www.xy.de after 5 seconds.

For the interrupt button I suggest a link to a page without this header.

I suppose the external python script is already running and waiting for an innterrupt or polling the card (in an endless loop). In every cycle of this loop I would update a file (eg. in /var or /tmp as you like) with the recent status. Apply an index number or something else that changes from loop to loop.

When generating the page you must look at this file and display its content (or something depending on its content). If the content is always the same then your python script hangs - if not you will always see the recent status.

Hope this helps.

Tilo