Posted on 09-29-2015 01:40 AM
Hi , i tried to run a python file through a script , but i receive errors from that file .
BUT when i run it from terminal everything works fine .
Do you have any idea what the problem may be?
Posted on 09-29-2015 04:15 AM
Could you post the script you are using? (Use the script formatting)
Also, Python is a script that can run on Mac OS X natively so you don't need to run it from a script unless there was a reason you were calling it that way.
Posted on 09-29-2015 04:35 AM
I need to run a .py to make some changes to the notification center .
-> #!/bin/sh
-> #!/usr/bin/env python
-> python /Documents/NCutil.py --alert-style alerts com.eukaryote.RSS
Posted on 09-29-2015 07:49 AM
I run python scripts from Casper quite regularly. You don't want two #! lines. Start your script with only "#!/usr/bin/python", which instructs it to use Python as the interpreter.
I guess another way to say it would be - don't call your python script from a Bash script within Casper. Just put the python directly into Casper.