nkf.py
import popen2
def nkf(s, opt=None):
cmd = "nkf"
if opt:
cmd = cmd + " " + opt
p = popen2.Popen4(cmd)
p.tochild.write(s)
p.tochild.close()
s = p.fromchild.read()
r = p.wait()
if r == 0:
return s
else:
raise Exception((r, s))
HyperArch.py
import nkf
894行と896行でarticle.subjectをUTF-8にデコード。
nkf.nkf(CGIescape(article.subject), '-w')
0 件のコメント:
コメントを投稿