I've created an executable Python file through py2exe
.
If I run this executable in its dist folder, it runs just fine.
This program it needs to have access to files that are in the dist
folder (txt files with reference data).
If I create a shortcut in my desktop to that executable file, the program runs but doesn't work properly. It seems that the program runs as its folder was the folder where the shortcut is, not where the exe is. So, it cannot find these txt files with the reference data.
In my code, I call those txt files like this:
ref_correction = np.matrix(np.genfromtxt( 'Reference_Data.txt' ))
How can I fix this?