I have a python project with multiple files and a cmd.py which uses argparse to parse the arguments, in the other files there are critical functions. What I want to do is: I want to make it so that if in the command line I were to put cmd -p hello.txt it runs that python file.
I was thinking that I could just simply move the cmd.py file to somewhere like /usr/bin/ or some other directory included in the $PATH, however since I have other files which work with my cmd.py, there will be multiple files in my /usr/bin.
Another thing that I could do is to make a symbolic link between the cmd.py and /usr/bin/cmd like this: ln -s /path/to/cmd.py /usr/bin/cmd, but then where do i put the cmd.py? and is this best practice?
Note: I intend for this to work on Linux and MacOS X, not windows
cmd.py, with all the peripherals inside/usr/bin, or better/usr/local/bin, or create a separated folder inside/usr/binor somewhere you wish then add it into $PATH environment variable.~/bin.