Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python reference parent module

$ cat function/bbb.py
import os
import sys

root_folder = os.path.abspath(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
sys.path.append(root_folder)

from common.aaa import say_hi

say_hi()
Source by xxx-cook-book.gitbooks.io #
 
PREVIOUS NEXT
Tagged: #python #reference #parent #module
ADD COMMENT
Topic
Name
1+4 =