<br><br><div class="gmail_quote">On Wed, Jun 11, 2008 at 2:16 PM, asdf <<a href="mailto:asdf@asdf.com">asdf@asdf.com</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">On Wed, 11 Jun 2008 11:20:48 +1000, Aidan wrote:<br>
<br>
> asdf wrote:<br>
>>> Well, there's a few ways you could approach it.<br>
>>><br>
>>> You could create a cgi program from your script - this is probably the<br>
>>> solution you're looking for.<br>
>>><br>
>>><br>
>> Output from the script does come up very often. There is a new output<br>
>> every 10 secs and it's possible that the script might be run<br>
>> indefinitely. Basically I want all that output displayed in a web<br>
>> browser<br>
><br>
> Well, in that case you could simply append the new output to a static<br>
> file every 10 seconds, or whenever there is new output.  That way, you<br>
> just need to refresh the static file in your browser to see updates...<br>
> Given what I understand of your situation, that's how I'd do it.<br>
><br>
</div>The problem with this is that browser would have to be refreshed manually<br>
every 10 seconds. Unless there is a way to set this in the script itself.<br>
<div><div></div><div class="Wj3C7c"><br>
<br>
> A constantly running CGI app is probably not the best idea, given<br>
> timeouts and other such constraints you might run into.<br>
><br>
><br>
>>> You could have the script run periodically and create a static html<br>
>>> file in the webroot... this would be acceptable, maybe preferable, if<br>
>>> the output from your script doesn't change frequently.<br>
>>><br>
<br>
--<br>
<a href="http://mail.python.org/mailman/listinfo/python-list" target="_blank">http://mail.python.org/mailman/listinfo/python-list</a></div></div></blockquote><div><br>Sorry should have asked how often a user would be requesting new
content. To avoid page refreshing I'd look into Django AJAX support,
havn't tried it myself but will be soon. </div></div><br>