python code
2017-12-27 本文已影响0人
Jeremyduan
dynamic load module
sys.path.append(os.path.direname(file_path+'/'+file_name+'.py'))
model_file = __import__(file_name)
pth_file = os.path.split(os.path.abspath(__file__))[0] +'/'+ pth_name
dynamic load module
sys.path.append(os.path.direname(file_path+'/'+file_name+'.py'))
model_file = __import__(file_name)
pth_file = os.path.split(os.path.abspath(__file__))[0] +'/'+ pth_name