I am trying to obtain the absolute path to the currently running script on OS X.
I saw many replies going for readlink -f $0. However since OS X\'s
readlink -f $0
Use Python to get it:
#!/usr/bin/env python import os import sys print(os.path.realpath(sys.argv[1]))