I have a simple python code to test out, test.py
import random
pressure = random.random() * 8
displacement = random.random() * 70
I want to add a simple AJAX code to my .html file to execute this test.py
$.ajax({
type: "POST",
url: "~/test.py",
data: { param: text}
}).done(function( o ) {
// do something
});
but it doesn't work. Am I doing something wrong?
Raspberry Pi, Raspbian, Apache server