python - Make an executable file on a mac -
i have tried gather information possible before posting question have had little luck. (i posted links below.)
i have file called "intro.py" @ path, "programming/py_projects/incubator/course".
i have file called "python.command" on desktop. within command file have following lines:
cd ../programming/py_projects/incubator/course bash python intro.py
when run command file (double click), terminal opens , result:
/users/muhs_a/desktop/python.command: line 1: cd: ../programming /py_projects/incubator/course: no such file or directory /usr/bin/python: /use/bin/python: cannot execute binary file logout
i want able double click on python.command file , have program written in intro.py run in terminal. going wrong?
how create batch file in mac?
why people write #!/usr/bin/env python on first line of python script?
how make file.sh executable via double click?
open terminal , run chmod +x ~/programming/py_projects/incubator/course
(i'm assuming directory programming in home dir). command changes permissions on script make executable.
Comments
Post a Comment