读写INI配置的Python库 iniparse

fmms 12年前
     <p>iniparse 是一个用来解析 INI 配置文件的 Python 库。</p>    <p>示例代码:</p>    <p></p>    <pre class="brush:python; toolbar: true; auto-links: false;">>>> cfg = INIConfig(open('options.ini')) >>> print cfg.playlist.expand_playlist True >>> print cfg.ui.width 150 >>> cfg.ui.width = '200' >>> print cfg['ui']['width'] 200</pre>    <p><strong>项目主页:</strong><a href="http://www.open-open.com/lib/view/home/1326943474577" target="_blank">http://www.open-open.com/lib/view/home/1326943474577</a></p>    <p></p>