Howto call an external (Python) Script?

Hey, I have an external Python Script that i want to execute inside of my Cakephp App to manipulate an Image. How can i do that?

shell_exec('python <path-to-pythonscript>')
But let me warn you: Don’t allow users to controll what is being input into the shell_exec, otherwise you have a major security hole.
Not really CakePHP related but more generally PHP related.

ok thank you! No I will only execute it on an imagefile that will be uploaded before…

Sorry I didnt know it will just work like this… there could be some cakephp configuration before…