cfg = ConfigParser() cfg.readfp(codecs.open('config.ini', "r", "utf-8-sig")) 读取配置文件https://python3-cookbook.readthedocs.io/zh_CN/latest/c13/p10_read_configuration_files.html