[Tutor] [OSX] "Executable" .py or pyc script (stuck at Applescript)

learner404 learner404 at gmail.com
Thu Nov 10 12:15:37 CET 2011


Hello list!

- myapp.py is in a "myfolder" folder that the "users" will be able to
download and put anywhere on their Mac.

- users don't have any Python knowledge and I have no idea if there's a
python launcher on their mac

=> trying to make an applescript file in the folder right next to myapp.py

I tried and failed at :

*tell* *application* "Terminal"

*do script* "python myapp.py"    # tried also with ./myapp.py

*end* *tell*

or

do shell script "python myapp.py" # tried also with ./myapp.py


In both cases OSX complains it can't find the file. It works though if I
give the full path but I can't do that since I have no idea where the
folder will be on their macs.

With Applescript how would write it  so that Python starts in the
application folder? (myapp.py & "myfolder")

Any other way to do it maybe knowing my constraints above? (I tried py2app
but it failed on wxpython on my Lion with Apple Python that I need to use)

Thanks!

francois
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20111110/2dc919fc/attachment.html>


More information about the Tutor mailing list