execute a python script

I'm new to Hazel and scripting in general. One of the steps I want Hazel to do is execute a python script. Linking directly to it from Shell Script option in Hazel, didn't seem to work. Manually executing the python script works fine. I made a simple Bash script:
(saved in same directory as the python script). And manually executing that script works. But in Hazel it doesn't. Tried AppleScript:
Manually executing in this case, launches Script Editor, but pressing RUN still makes it launch the python script. However, doesn't work in Hazel. Saving in all the other Save As.. options available in Script Editor, is not even selectable by Hazel.
Clearly I'm missing something here.
[/code]
- Code: Select all
#!/bin/bash
pythonscript.py
(saved in same directory as the python script). And manually executing that script works. But in Hazel it doesn't. Tried AppleScript:
- Code: Select all
ignoring application responses
tell application "Terminal"
activate
do script with command ¬
"pythonscript.py ;"
end tell
end ignoring
Manually executing in this case, launches Script Editor, but pressing RUN still makes it launch the python script. However, doesn't work in Hazel. Saving in all the other Save As.. options available in Script Editor, is not even selectable by Hazel.
Clearly I'm missing something here.
[/code]