I have written a library in python, that is kind of like a scripting language, and I had the idea of turning the library into a terminal executable that could be called like:
myprogram /path/to/file
So like python runs .py, this would run the file with the functions defined in my library. Is this at all possible?
#!/usr/bin/pythonas first line. THenchmod +x myprogram.pyexecutable.pyas I said and then make links to that in the form oflibfun1,lbfun2, ... In theexecutable.pyyou make check over what is the zeroeth sys.argv, and based upon sys.argv[0] you dispatch to particular functionbusyboxas far as I understand