import sys
sys.path.insert(0, 'path/to/your/py_file')
import py_file
#Unfortunately, Python will only find your file if your file is in the systems path. But fear not! There is a way around this!
#Using python's sys module, we can add a directory to the path just while Python is running, and once Python stops running, it will remove it from the path.
#You can do this by:
import sys
sys.path.insert(0, '/path/to/application/app/folder')
import [file]
import sys
sys.path.insert(0, 'path/to/your/py_file')
import py_file
#Unfortunately, Python will only find your file if your file is in the systems path. But fear not! There is a way around this!
#Using python's sys module, we can add a directory to the path just while Python is running, and once Python stops running, it will remove it from the path.
#You can do this by:
import sys
sys.path.insert(0, '/path/to/application/app/folder')
import [file]