import sys
sys.path.insert(0, "/path/to/application/app/folder")
import file
file.py
is located in /path/to/application/app/folder
."/path/to/application/app/folder"
./path/to/application/app/folder
into ./folder
. Means the file.py
is located in the folder named "folder" in the root of the executed Python script.