How does your Construct program know when the file is updated?
Right now, you are reading darkoutside.py only once, on start of layout.
You'll need to AJAX request again whenever you want to update - either by every x seconds for a refresh rate, or ideally some sort of trigger.