python import from other folder outside folder

Solutions on MaxInterview for python import from other folder outside folder by the best coders in the world

showing results for - "python import from other folder outside folder"
Daniela
05 Jan 2017
1# Bring your packages onto the path
2import sys, os
3sys.path.append(os.path.abspath(os.path.join('..', 'other_folder')))
4
5# Now do your import
6from other_folder.other_file import *