python创建文件并写入内容

#创建文件,msg即要写入的内容
def create__report(msg):
    report_path=get_aft_path()+"\\Report\\report.html"
    f=open(pass_report_path,"a")
    f.write("<meta http-equiv='Content-Type' content='text/html; charset=utf-8'>")
    f.write("<p align='right'>"+msg+"</p>")
    f.close

猜你喜欢

转载自blog.csdn.net/sterson/article/details/79804214
今日推荐