I have a python script let\'s name it script1.py. I can run it in the terminal this way:
python /path/script1.py ...
but I want to run like
You need to use a hashbang. Add it to the first line of your python script.
#!
Then change the file permissions, and add the executing permission.
chmod +x
And finally execute it using
./
If its in the current directory,