applescript/python question
jyoung79 at kc.rr.com
jyoung79 at kc.rr.com
Sat Aug 2 19:04:03 EDT 2008
Hi Diez,
Thanks for your reply. I gave this a try too, but it doesn't seem to work either.
However, a gentleman just emailed me off-list recommending to use the full path to Python that is in /usr/local/bin. This is where Python 2.5 looks to be installed rather than Python 2.3 which is in /usr/bin. I ran the following code below and it works great!
> --------------------
> set p to "#!/usr/bin/python
> import sys
> print sys.version[:3]"
> set x to do shell script "/usr/local/bin/python -c \"" & p & "\""
> return x
> --------------------
Thank you all again for your thoughts and replies. I really appreciate it!!
Jay
> I guess the shebang is simply ignored - the actual interpreter is
> fetched from the "Python -c"-line.
>
> It's a bit weird that there is Python with a capital P, but what happens
> if you change that to Python2.5 for example?
>
> Diez
More information about the Python-list
mailing list