I am trying to get the path of my python script.
I know 'sys.argv[0] gives me the path and the name of my python script.
how can I just get the path?
I tried:
print sys.argv[0]
path = sys.argv[0].split("/")
scriptpath = "".join(path[0:-1])
But it does not add back the path separator.