Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

import file from parent directory python

import os, sys
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
# import ../db.py
import db
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #import #file #parent #directory #python
ADD COMMENT
Topic
Name
2+9 =