解码HTML实体。
htmlentitiesdecode的Python项目详细描述
这个模块使得在字符串中解码HTML实体变得很容易。
许可证
htmlentiesdecode是根据 去他妈的你想公开许可2版(或任何更高版本)。这个 htmlenties的作者是niels serup,可在 ns@metanohi.org。这是程序的0.1.1版。
安装
如果安装了python setuptools,则可以执行以下操作:
$ sudo easy_install htmlentitiesdecode
或者,下载并提取这个 每一页,然后运行此:
$ sudo python setup.py install
最新版本的htmlentitiesdecode始终位于 http://metanohi.org/projects/htmlentitiesdecode/和Python 包索引
使用
此模块只有一个主函数:decode。示例用法:
>>> from htmlentitiesdecode import decode as entity_decode >>> print entity_decode('Wie heißt du?') Wie heißt du? >>> print entity_decode('Ich heiße "htmlentitiesdecode".') Ich heiße "htmlentitiesdecode". >>> print entity_decode('Wir heißen "modules".') Wir heißen "modules".
运行
安装此模块后,您将同时拥有一个模块和一个 使用模块解码功能的命令行脚本这个 脚本可以这样运行:
$ decodehtmlentities TEXT
变更日志
- 版本0.1.0:初始版本
- 0.1.1版:修复了自述文件中的错误