I have a python script that I can run in the normal way using Terminal. For example, run Terminal, cd in the directory, then enter. /xxx.py, where xxx.py is the name of the file containing the script.
Now I want to make a desktop icon that launches Terminal and runs the python file when I double-click it. How can I do it? I thought I could create a shell file using cd and the launch command, and then link this shell file to Terminal. But I can not associate it with Terminal.
Someone said to name the shell file with the suffix ".command", but this forces it to run Flash Builder. I do not know where this assistant is installed. I cannot connect the terminal directly because I cannot find it. This is not in / Applications.
source
share