Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
已经失败地查看了整个网络。我正在运行一个 python 脚本,我希望它以表格格式将数据输出到我的 html 文件中。既然我得到的都是 CGI 和所有我不知道的东西,那怎么能做到呢!
HTML 文件只是一个普通文件。
with open("/tmp/myfile.html", "w") as my_file: my_file.write("<html><body><table>") for x in range(5): my_file.write("<tr><td>%d</td></tr>" % x) my_file.write("</table></body></html>")