前言: 使用python在读取配置文件时,由于配置文件中存在特殊字符,读取时出现了以下错误: configparser.InterpolationSyntaxError: '%' must be followed by '%' or '(', found: '%sbc09' 错误代码: config=configparser.ConfigParser() 解决方案: 使用 RawConfigParser()方法进行读取即可,代码如下: config=configparser.RawConfigP…
最近项目用到ini文件,读取ini文件,方法如下: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Collections.Specialized; using System.IO; using System.Runtime.InteropServices; using System.Windows.Forms; namespace test{ /…