I have the following directory structure:
application tests main.py main.py
application/main.py contains some functions.
To import a file in a different subdirectory of the parent directory, try something like this:
sys.path.append(os.path.abspath('../other_sub_dir')) import filename_without_py_extension
Edit: Missing closing bracket.