I am afraid I do not know how to phrase my problem, but this post asks about what I am trying to say. However, I was wondering if this was possible in Python. (once again, sorry for my lack of being able to explain my problem).
I have tried the sys.argv[0]
command, but this only gives me the path of the executable, where I want the path of a file opened with the executable.