How to call a Python Script from PHP?

You use the system function: http://php.net/manual/en/function.system.php

Something like this:

$mystring = system('python myscript.py myargs', $retval);

Leave a Comment