2015-03-26から1日間の記事一覧
python2系ならばhtmlentitydefsをimportしたりするところだろうけれど、python3ではhtml.entityに移動しているのでこうする。 import html.entities chr(html.entities.name2codepoint[foo]) これだけ。 たとえば & なら chr(html.entities.name2codepoi…
python2系ならばhtmlentitydefsをimportしたりするところだろうけれど、python3ではhtml.entityに移動しているのでこうする。 import html.entities chr(html.entities.name2codepoint[foo]) これだけ。 たとえば & なら chr(html.entities.name2codepoi…