How to Make an Alias (shortcut) to Run a Python Program?

Discussion in 'Mac Ham Radio on macOS & iOS' started by N0TZU, Feb 8, 2020.

ad: l-rl
ad: L-MFJ
ad: Subscribe
ad: Left-3
ad: l-BCInc
ad: abrind-2
ad: Left-2
  1. N0TZU

    N0TZU Platinum Subscriber Platinum Subscriber QRZ Page

    I put copious comments in the things I wrote for work. Otherwise, the poor guy trying to figure it out a year later would be ME. This was especially necessary for APL, if you know what that is, and to a lesser extent with Matlab.
  2. N2IW

    N2IW Ham Member QRZ Page

    In case you haven't made it work, here is my advice: If double click open the file instead of run it, right click the file (assume it's a .py file?) and click "Get Info", there is a drop box in the middle of the popup window called "Open with", choose "Terminal" or "iTerm" if you want to. If Terminal is not in the list, click "Other" then find Terminal in /Applications/Utilities. If it's grey, change "Enable" drop down to "All Applications" (default is "Recommended Applications"). After this, double click the python file will run it, assuming you added #! line at top of the file. It's definitely doable and once you know how to do it, it's pretty simple to create shortcuts for any applications and commands.

Share This Page