jgoenetxea
4/17/2019 - 6:58 AM

How to import files out of module folder tree

import os
import sys

# To import '../../folder_name/foo.py'
external_file_path = os.path.abspath(os.path.join('..', '..', 'folder_name'))
sys.path.append(external_file_path)

from foo import bar