print(('sys.argv[0] =', sys.argv[0]))
pathname = os.path.dirname(sys.argv[0])
print(('path =', pathname))
print(('full path =', os.path.abspath(pathname)))
How do I get the path of a the Python script I am running in?