cnDenis的笔记
  • 我的碎碎念
  • 关于我

Python2.x中支持unicode的configparser

Python2.x中许多内置模块不支持unicode,确实是很烦的事。configparser就是其中之一。

解决方法是使用Python3.x中configparser的backport,http://pypi.python.org/pypi/configparser,下载后解压,把其中的configparser.py和configparser_helpers.py放到你的代码所在文件夹中。然后在import时把

    import ConfigParser

改成

    import configparser

就可以了。

参考:http://bugs.python.org/issue11597

more ...

About cnDenis

  • Categories

    • Erlang
    • Python
    • Tools
    • Web
  • Tags

    • all
    • any
    • Apache
    • Atom
    • BeautifulSoup
    • BIF
    • Binary
    • 并发
    • Blog
    • configparser
    • 代码片段
    • Dialyzer
    • Disqus
    • Erlang
    • ets
    • gen_server
    • HelloWorld
    • IDE
    • JavaScript
    • Jekyll
    • jqPlot
    • 列表
    • lists
    • Markdwon
    • nonlocal
    • OTP
    • PHP
    • proplists
    • PyGraphviz
    • Python
    • 时间
    • SQL
    • String
    • Sublime
    • supervisor
    • Tk
    • Ulipad
    • 中文
    • 字符串
  • Links

    • Erlang官网
    • Pelican官网
  • Archive

    • 一月 2013 (1)

© 2013 cnDenis · Powered by pelican-bootstrap3, Pelican, Bootstrap

Creative Commons License Content licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License, except where indicated otherwise.

Back to top