I am learning Python now. There are 2 ways of running python in the terminal.
one is
python xx.py
another ./xx.py
The first way works for me, but when I am trying to run using the second option, I get
-bash: ./hello.py: Permission denied
I can run the python program one way or another, but I would really like to know why, and what command should use to grant permission to run this using ./
Thanks!
In order to be executable, the script must be granted execute permissions via chmod:
chmod +x filename.pyor the like.