How to run a python script inside Applescript?

applescript, python

Solution

You are trying to run the script directly instead of using Python to run it. You need to do shell script `python`, passing the path to your script as an argument.

do shell script "python /Users/Tom/Desktop/ayscript.py"

Problem

I had to do an Applescript and by the end of it i just want to run a python script. I wrote ``` do shell script "/Users/Tom/Desktop/ayscript.py" ``` But it's said "permission denied" Any idea ?

Original source