Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

make python file executable in Bash

# in Python script file, write in first line:
#!/usr/bin/env Python3

# mark your file as executable, in Bash type:
chmod +x HelloWorld.py

# now can execute file with ./ for relative path, instead of using python3
./HelloWorld.py
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #file #executable #Bash
ADD COMMENT
Topic
Name
2+4 =