A simple web server approach for you to interact with your Python scripts from a web interface would be to use Python bottle.
Here is a basic Python bottle program you could use for your purposes:
from bottle import route, run
@route('/')
def hello():
#using jquery
return """<script> poll get_temp with JavaScript here</script><div id="temp">temp will update here</div>"""
@route('/get_temp')
def getTemp():
temp = readDataBaseForTemp()
return temp
run(host='localhost', port=8080, debug=True)
when you start this program you can use a browser to interact with it on http://localhost:8080/
<--- this will trigger the JavaScript that will poll the server for the temp. Obviously it's not complete but it's the general idea.
The idea here is that JavaScript just makes a call to the Python webserver (using URL http://localhost:8080/get_temp
) which triggers your Python myTemperatureControl script. When your script has executed and returns a temperature value it will then send the data back to the JavaScript that asked for it so that the webpage can be updated accordingly.
As for your myTemperatureControl.py script you can send the output of the temperature readings to a common place that will be accessible to the webserver. Typically you would have a database setup for this purpose.
while True:
if temperature > 30:
output = 1
else:
output = 0
#update database or file with output