In BGE, in an initialization script, I have these instructions:
var=bge.logic.expandPath("//")
print("====== path=",var,"=======")
and now the variable "var" is set to the path of the Blender file.
Ok, but when I export the game (Save As Game Engine Runtime) and move the saved file to another path or another PC, the "var" variable does not change, i.e. it remains the one it was before moving the file.