Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

make python file executable linux

put this in the first line of your script:
#!/usr/bin/env python

Make the file executable with
chmod +x myfile.py

Execute with
./myfile.py
Comment

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
Comment

PREVIOUS NEXT
Code Example
Python :: moving average numpy 
Python :: sort dictionary python 
Python :: apple 
Python :: datafram from one date to another 
Python :: how to find the length of a list in scratch 
Python :: first openfaas python function 
Python :: python specify typeError output 
Python :: how to remove trackback on python when ctrl c 
Python :: pandas print duplicate rows 
Python :: python selenium go back to previous page 
Python :: django create app 
Python :: listing index elasticsearch python 
Python :: python make integer into a list 
Python :: rename file python 
Python :: django admin table columns wrap text into multiple lines django 
Python :: SQL Query to Join Two Tables Based Off Closest Timestamp 
Python :: how to include specific data type from the dataframe 
Python :: python get ip info 
Python :: histogram seaborn 
Python :: upgrade to latest django version 
Python :: how to subtract minutes from time in python 
Python :: tag for deleting a list in python 
Python :: get all paragraph tags beautifulsoup 
Python :: merge multiple csv files into one dataframe python 
Python :: sort strings as numbers python 
Python :: none address in python 
Python :: pandas series to list 
Python :: how to factorise expressions in python 
Python :: plt ax title 
Python :: python valeur de pi 
ADD CONTENT
Topic
Content
Source link
Name
2+1 =