I am using linux mint, and to run a python file I have to type in the terminal: python [file path]
, so is there way to make the file executable, and make it run
yes there is. add
#!/usr/bin/env python
to the beginning of the file and do
chmod u+rx
assuming your user owns the file, otherwise maybe adjust the group or world permissions.
.py files under windows are associated with python as the program to run when opening them just like MS word is run when opening a .docx for example.