jeudi 29 janvier 2015

Call server side python script from webpage

I am a hobbyist and have learnt most of what i know about coding by trawling these forums.


I have a network of Raspberry Pi computers that are programmed to take a photo when the server sends a multicast message. this is all working and implemented in Python.


I would like to setup a webpage to act as a GUI to send the multicast message including some parameters which are passed to the python script when it is executed. I would be happy for a button which launched the script and go from there.


I have setup apache and have been able to launch php and python simple scripts directly.


The scripts that i have created so far are only 'hello world' style scripts, anything more than printing to html seems to fail without any feedback So far i have been searching for a few weeks, i have done tutorials for HTML CSS Javascript and Jquery and am no closer. I have also considered running the whole thing from a python web framework but didnt have much luck with that either. Ideally, i would like to have a webpage that can run a script when the buttons are pressed.


I understand that this is probably too many words with out any code but i am quite lost at the moment. It seems like a task that i should be able to find tutorials for but i have had no luck. Any help would be appreciated.





Aucun commentaire:

Enregistrer un commentaire