I am having a problem where I can't save files in the executable directory. Specifically
it saves it to C:\Users\hp\AppData\Local\Temp\_MEI102682\screenie.png
Pyinstaller command: pyinstaller --onefile main.py
code:
import pyautogui
import os
__dir__ = os.path.dirname(os.path.abspath(__file__)) + '\\'
print("Taking screenshot...")
pyautogui.screenshot().save(__dir__ + "screenie.png")
print(f"Saved to: {__dir__}screenie.png\nPress enter to open the file.")
input()
os.system(__dir__ + "screenie.png")