4

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 ?

4
  • You don't have permission Commented Apr 16, 2014 at 11:37
  • It's my script and my computer ! Off course I have permission how to explain that to Applescript ? Commented Apr 16, 2014 at 11:43
  • Why don't I have permission and how to solve that problem ? Commented Apr 16, 2014 at 12:18
  • Can you try running the script with elevated priviledges? Equivalent of sudo in Unix. Commented Apr 16, 2014 at 12:19

1 Answer 1

7

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"
Sign up to request clarification or add additional context in comments.

1 Comment

Thanks finally I put that which is working : " do shell script "/usr/local/bin/python3 /Users/xxx/xxx.py"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.