目的: packg2中test模块调用packg1中的test1模块中test1函数?
import sys
import os
sys.path.append(os.path.abspath(os.path.dirname(__file__)+'/'+'..'))
from packg1.test1 import test1
test1()
注意 一定要加上以下代码
import sys
import os
sys.path.append(os.path.abspath(os.path.dirname(__file__)+'/'+'..'))