I am trying to run a Python program using PHP. Here\'s the code
$command = \'/usr/local/bin/python script.py file\'; $temp = exec($command, $output);
To get my CodeIgniter helper to run a python script, I had to put #!/usr/bin/python on the first line of my python script, and NOT call python from the exec.
+1 for also doing chmod +x
My helper looks like this: