michaelcmartin/Ophis — pull request #2 by catseye (2011-12-19 21:50:50+00:00)
Title: Rewrite the driver script in Python; use os.path.realpath().

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 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.