安装configparser模块
pip install configparser
添加配置文件 filename.conf
[file] word_vec : word_vec.data
读取代码
import configparser
config = configparser.ConfigParser()
with open("filename.conf", "r") as cfg_file:
config.read_file(cfg_file)
print(config.get("file", "word_vec"))