Javascript execute python file
Solved it by spawning my python script from nodejs and communicating in realtime to my webclient using socket.io.
I'm building a house monitor using a Raspberry Pi and midori in kiosk mode. I wrote a python script which reads out some GPIO pins and prints a value. Based on this value I'd like to specify a javascript event. So when for example some sensor senses it's raining I want the browser to immediately update its GUI.
What's the best way to do this? I tried executing the python script in PHP and accessing it over AJAX, but this is too slow.