在文件的最上面添加代碼综慎,用來獲取文件的絕對(duì)路徑
import sys
import os
curPath = os.path.abspath(os.path.dirname(__file__))
rootPath = os.path.split(curPath)[0]
sys.path.append(rootPath)
在文件的最上面添加代碼综慎,用來獲取文件的絕對(duì)路徑
import sys
import os
curPath = os.path.abspath(os.path.dirname(__file__))
rootPath = os.path.split(curPath)[0]
sys.path.append(rootPath)