0
我希望在python 2.7中這樣做,從文件中導入模塊。importlib for python 2.7 from 3.6
(在蟒蛇3.6)
import importlib.util
spec = importlib.util.spec_from_file_location(module_name,filename)
module = importlib.util.module_from_spec(spec)
spec.loader.exec_module(module)
return module
我怎麼能去呢?