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

we are a community of more than 2 million smartest coders
registration for
employee referral programs
are now open
get referred to google, amazon, flipkart and more
register now
  
pinned-register now
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 *