I want to run a Python script, which uses argparse
, without having to type python
at the beginning.
What I do
$ python file.py --arg value
What I want
$ file --arg value
I have done the first part through putting the file in a folder that is added to PATH variable but then argparse
is not working correctly as when I type in:
$ file --arg val
It says that arg
can't be None
even though I passed it in ( it can't read the args I pass it when called like this even though it works well when I use $ python file.py --arg val
I hope this makes sense.