ywg 发表于 2017-5-7 10:38:09

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编码的文件