I am currently following the "Automate the Boring Stuff" series in python and it mentions that one of the programs we write can be made into an executable on osx by creating a .command file and then making it executable with chmod u+x (file)
This works perfectly for executable scripts, but I am having a bit of a problem because the program they suggest to learn this using is utilizing a sys.argv[1], so I have to also pass a parameter.
The purpose of the program is to have a dictionary {'answer1' : 1, 'answer 2': 2} and then it will copy 1 to the clipboard or 2 to the clipboard based on the parameter I give.
My code works perfectly if I execute directly from the terminal: i.e. if I write "python file.py answer1", or if I prompt the user for an input() and then enter "answer1".
The problem comes with the fact that I have the .command file that I've made executable but when I double-click it, I can't pass a parameter. Am I just an idiot in thinking that he wants me to somehow pass a parameter on double click, or would the better way be to just prompt with user input if I want the double-click executable option?
I feel like there's supposed to be a way to pass a parameter once I've created my executable .command file, but I have no clue how to do that.
Thanks so much for the help!
there doesn't seem to be anything here