How to get the current path of compiled binary from Python using Nuitka?
问题 Nuitka is good at compiling Python to excutable binary. But the compiled binary finds other resource files from original absolute path. Thus, for moving to another computer requires to make the directory tree same as the original one. For example, if I compile a project like this: /home/me/myproj/ ╠═ myprog.py ╚═ resource ╚═ foo.data I should put the resulting binary and resource to the same location of another computer. How to solve this problem? My simpler spike is: # /home/me/myproj/spike