I am running the following code:
DIRECTORY_PATH = os.getcwd()
print(DIRECTORY_PATH)
print(__file__)
print(os.path.abspath(__file__))
input("Press enter to continue ...")
But I get different results when I run after I use pyinstaller versus running just the python script. Is there a way to get the directory that the exe is in?
Running pyinstaller --onefile exe (notice the blue powershell behind the black python shell that contains the command used to run the exe)