Tried sys.argv[1] and it works, while os.getcwd() returned "C:\WINDOWS\system32". Not sure why the comment was removed but thanks!
I used pyinstaller to convert py into exe, for opening .jpg files.
I would like to get the jpg path (not the executable) where my application is running from, so that it can open the jpg directly by double-clicking the jpg.
Could you advise how to achieve this in python?
Thanks!
Get file path (not the executable) where application is running from?