I am wondering how to make an entry point to call a python script, similar to black
.
e.g.:
black my_script.py
Say I have a python file called fix_newline.py
.
Instead of calling python fix_newline.py path/to/my_script.py
in the directory of fix_newline.py
, I'd like to assign the name fix_newline
to python path/to/fix_newline.py
.
The ultimate goal is to call fix_newline
from anywhere in my directory tree, as long as I am in the same environment (e.g. ~/.bash_profile
).