To avoid the program changing location on the stored computer always include:
import sys, os
LOCAL_DIR_PATH = os.path.dirname(sys.argv[0])
If you want to call or include another file in you program always use join:
FILE_PATH = os.path.join(LOCAL_DIR_PATH, FILE_NAME)
If the file is stored in a sub-directory within the working folder, define the folder first before addressing the file.
FOLDER_PATH = os.path.join(LOCAL_DIR_PATH, FOLDER_NAME)
FILE_PATH = os.path.join(FOLDER_PATH, FILE_NAME)
Avoid using a full path in a pure string variable
WORKING_DIR_PATH = "C:\dev\python\project"
Note: "os" is a standard library, meaning it comes with Python and is cross-platform. After os has been first imported, there is no loss in performance to repeatedly call upon os built-in modules, for instance:
os.path