After my last comment on the previous pull request, I thought about the problem a bit, and offer this as a possible solution.
I realized that while realpath isn't a standard Unix command, os.path.realpathis a standard part of Python, and it should be OK to rely on Python being installed, given that Ophis is written in Python. So, I rewrote the driver script in Python; actually, I just made it modify sys.path before doing exactly what ophismain.py does.
I suppose this could replace ophismain.py, or this functionality could go into ophismain.py (but I would certainly prefer to type ophis at the shell prompt. And having both a file called ophis and a directory called Ophis in the same directory wouldn't work for users with case-insensitive file systems.)
The driver script still has limitations; for example, it won't work if you move it somewhere else, like /usr/local/bin. But I don't think there is a good solution for that short of turning the project into a full-blown Python package with a setup.py and so forth.
After my last comment on the previous pull request, I thought about the problem a bit, and offer this as a possible solution.
I realized that while
realpath
isn't a standard Unix command,os.path.realpath
is a standard part of Python, and it should be OK to rely on Python being installed, given that Ophis is written in Python. So, I rewrote the driver script in Python; actually, I just made it modifysys.path
before doing exactly whatophismain.py
does.I suppose this could replace
ophismain.py
, or this functionality could go intoophismain.py
(but I would certainly prefer to typeophis
at the shell prompt. And having both a file calledophis
and a directory calledOphis
in the same directory wouldn't work for users with case-insensitive file systems.)The driver script still has limitations; for example, it won't work if you move it somewhere else, like
/usr/local/bin
. But I don't think there is a good solution for that short of turning the project into a full-blown Python package with asetup.py
and so forth.