楼主:
cutekid (可爱小孩子)
2018-06-18 14:17:36import os,sys,inspect
#####################################
# get file dir then add relative path
file = inspect.getfile(inspect.currentframe())
pathdir = os.path.dirname(os.path.abspath(file)) + '/..'
sys.path.insert(0,pathdir)
####################
# import your module
import say_hello
say_hello.hello_world()
※ 引述《clsmbstu (missing)》之铭言:
: 假设我有一个资料夹(helloworld)在桌面上,结构如下:
: helloworld
: |