解决Python往文件中插入多行字符串时的一个小问题

用Apache搭了一个最简单的Http服务器,每一次自动化脚本跑完之后要往http服务器的首页insert一条记录。
截图:
ee-auto-report

往Html源文件插入一行的代码如下所示:

def modify_index_html(apache_dir, log_path):
    """
    Function:Update the index.html to reflect the run result to the overall report
    @apache_dir: Apache http server folder:"C:\\Program Files (x86)\\Apache Software Foundation\\Apache2.2\\htdocs\\"
    @log_path: the path to the log generated in this run
    """
    logger.info("Updating ...
more ...