1import sys
2# sys.path is a list of absolute path strings
3sys.path.append('/path/to/application/app/folder')
4
5import file
1import sys
2# sys.path is a list of absolute path strings
3sys.path.append('/path/to/application/app/folder') # <-- relative path
4
5import your_file
1# By default, you can't. When importing a file, Python only
2# searches the current directory, the directory that the
3# entry-point script is running from, and sys.path which includes
4# locations such as the package installation directory
5# (it's actually a little more complex than this, but this covers
6# most cases).
7
8# you can however, add to the path at runtime
9
10import sys
11# insert at position 1 in the path, as 0 is the path of this file.
12sys.path.insert(1, '/path/to/application/app/folder')
13
14import file
15
16file.function()
1#My explanation is a bit too long for a grepper answer, so just paste this into your browser search bar
2#https://hastebin.com/tefosufoji.sql