Reputation: 671
On my raspberry pi i have apache2 running. i have a very basic image displayed when you go to the site. What i want to be able to do is, when the image is clicked i want the following script to run.
import subprocess
subprocess.call('./milight_sources/milight 0 ON', shell=True)
Now, i'm pretty sure django isn't the answer and neither is Flask. can you suggest the best way to do this? perhaps i don't even need to use a framework at all?
I'm pulling my hair out over this and am determinted to get it working. any suggestions will be great.
Many thanks!
Upvotes: 0
Views: 86
Reputation: 544
Sounds like a small script that utilizes cgi should do the job
https://docs.python.org/2/library/cgi.html
Upvotes: 1