Milo Land

Make Python 'Apps' and Shortcuts To Run Them on OSX

After experimenting with PyInstaller and Platypus to create a standalone app in OSX with no success, I went the much lower fidelity route. But it was successful, so I'm happy with it.



The goal of this was first to make a standalone app that will run Python script, but second to assign it to a keystroke. I have only tested this with running a Python script, but I can't imagine it would be much more difficult for any other bash script. So here is the process:

do shell script "cd 'path/to/script'; source venv/bin/activate; python"`

**NOTE**: If you don't do the following steps, your shortcut will not work.