Call python from module and receive output I am creating a Drupal 7 custom module and would like to call a python script from the PHP and receive back some output from the script.  I am running on a Linux OS and have the following so far:

    $command =  "/usr/bin/python " .  drupal_get_path("module", "mycustmod") . "/pycriptdir/pyscript.py ../../../../default/files/shapefiles/CherokeeCounty.shp";
    $output = shell_exec($command);


Within the python script I am using echo to pipe the output.  However, I do not get anything back into the output variable as I would expect. 

Any advice on how to get this to work would be greatly appreciated.

Thanks, 
Derek
Thanks for the responses.  The basic take-home for me here is to try a simple python script shell_exec first.  Once I did this I was able to quickly see that shell_exec was working as expected.  This in turn led me to my issue which ended up being not really related where I had some minor path issue that were throwing me off.  Perhaps drupalist advice to "try a simple command to make sure shell_exec works, then check the python" will help others with the same issue.

Derek