I had a small python script that takes input from the command line arguments and done some operations using the inputs taken and display the result
Below is the working example code
some_file.py
import sys arguments = sys.argv first_name = sys.argv[1] second_name = sys.argv[2] print "Hello {0} {1} !!!!".format(first_name,second_name)
Now i am executing this as
python some_file.py Steve jobs
Result :
Hello Steve Jobs !!!!
Now what all i want is, i don't want to use python command before file name and extension of python file name, that is i want to run the file as a command tool as below
some_file Steve Jobs
so what to do in order to run the python file as above ?