I try to get the current directory name of the compiled script by the use of the following statement:
application_path = os.path.dirname(os.path.realpath(sys.executable))
When I run the python script it returns:
_C:\Users\neo\Downloads\loki-master_
When I run the compiled executable, it returns:
_C:\Users\neo\DOWNLO1\LOKI-M1_
This is the old MS DOS 8.3 filename style called SFN. I use the application path to exclude it from a directory walk later on but the path returned by os.walk() is obviously different than the one returned by sys.executable.
Is this a bug? Is there a way to retrieve the executable's full path?
I want to allow users to run the executable from other working directories.