I've built a sensor to measure some values.
I would like to show it on a web page with python.


This is an extract of the code:

file  = open("myData.dat", "w")

while True:
        temp = sensor.readTempC()
        riga = "%f\n" % temp
        file.write(riga)
        time.sleep(1.0)

file.close()

Until this all ok.
Then in PHP I read the file and show it on internet. It works ok but...
First problem. I've to stop the streaming with CTRl-C to load the PHP file because if I try to read during measurement I cannot show anything (I think because the file is in using).
How can I show time by time in a webpage the output?

--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to