[Pythonmac-SIG] How to create a desktop alias to run a python file?
alfred at 54.org
Tue Mar 20 17:30:55 CET 2007
> From: Stani's Python Editor <spe.stani.be at gmail.com>
> This is probably very easy, but I don't find how to do it. I want to
> execute this command if an user clicks on the icon of the alias on the
> /usr/bin/pythonw path/gui.pyw
Like other people said, you probably don't want to do that, but unlike other
people, I'll answer your question.
echo '#!/usr/bin/env pythonw /path/gui.pyw' > ~/Desktop/MyProg.app/MyProg
chmod +x ~/Desktop/MyProg.app/MyProg
double click MyProg on the desktop and it should launch your python program
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Pythonmac-SIG