sh-bang - executable on Linux/Apple
examples/basics/hello_ex.py
#!/usr/bin/env python print("Hello World")
- The first line staring with # is needed if you want to have a file that can be executed without explicitly typing in python as well.
- Make your file executable: chmod u+x hello_ex.py
- Run like: ./hello_ex.py
- In order to run it as hello_ex.py in needs to be located in one of the directories listed in the PATH environment variable.