View Single Post
Old 08-23-2009, 05:11 PM   #4
adullday
Enthusiast
adullday ought to be getting tired of karma fortunes by now.adullday ought to be getting tired of karma fortunes by now.adullday ought to be getting tired of karma fortunes by now.adullday ought to be getting tired of karma fortunes by now.adullday ought to be getting tired of karma fortunes by now.adullday ought to be getting tired of karma fortunes by now.adullday ought to be getting tired of karma fortunes by now.adullday ought to be getting tired of karma fortunes by now.adullday ought to be getting tired of karma fortunes by now.adullday ought to be getting tired of karma fortunes by now.adullday ought to be getting tired of karma fortunes by now.
 
Posts: 35
Karma: 483720
Join Date: Aug 2009
Device: none
You can run shell scripts by double clicking them by using the .command extension.

Make sure that the first line of the script points to the proper interpreter. e.g. for python on the Mac it would look like:

#!/usr/bin/python

Then change the extension (for a gui'd python it would probably be .pyw) to .command. Run

chmod +x mypythonscript.command

just to make sure it's executable. Now you should be able to run it by double clicking.

Dragging and dropping files on the icon are a wee bit more complicated, and might require the use of an applescript.
adullday is offline   Reply With Quote