Monday, May 13, 2024
 Popular · Latest · Hot · Upcoming
6
rated 0 times [  10] [ 4]  / answers: 1 / hits: 18287  / 15 Years ago, wed, april 8, 2009, 12:00:00

I have a python script that runs continuously. It outputs 2 lines of info every 30 seconds. I'd like to be able to view this output on the web. In particular, I'd like the site to auto-update (add the new output at the top of the page/site every 30 seconds without having to refresh the page).



I understand I can do this with javascript but is there a python only based solution? Even if there is, is javascript the way to go? I'm more than willing to learn javascript if needed but if not, I'd like to stay focused on python.



Sorry for the basic question but I'm still clueless when it comes to web programming.



Thx!


More From » python

 Answers
40

This question appears to have two things in it.




  1. Presentation on the web. This is easy to do in Python -- use Django or TurboGears or any Python-based web framework.


  2. Refresh of the web page to show new data. This can be done two ways.




    • Some fancy Javascript to refresh.


    • Some fancy HTML to refresh the page. The meta refresh tag is what you want. If you do this, you have an all-Python solution.




[#99728] Thursday, April 2, 2009, 15 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
carlo

Total Points: 705
Total Questions: 87
Total Answers: 101

Location: Indonesia
Member since Wed, Jul 7, 2021
3 Years ago
;