I am trying to make my python autoupdate code. The problem is that the code pulls four html files, which means four new tabs in the browser each time it starts.
I tried auto-updating using an answer from a similar question: What is the best way to execute a function multiple times every x seconds in Python?
import time
starttime=time.time()
while True:
output_file("first.html", title="First HTML Page")
output_file("second.html", title="Second HTML Page")
time.sleep(60.0 - ((time.time() - starttime) % 60.0))
The problem with this method is that every minute it pulls out four more tabs - that is, after four minutes I already have 16 tabs!
Does anyone know how to auto-update using the same tabs? I would even delete the original tabs and replace them, although I imagine it is less elegant.
EDIT: Windows, IE, Firefox Chrome.