lzj520 发表于 2013-2-7 15:02:11

python生成utf-8编码的文件

import codecs
 
f = codecs.open( "html/report.html", "w", "utf-8" )
    f.write(
         tmpl.render( result )
    )
    f.close()
页: [1]
查看完整版本: python生成utf-8编码的文件