Python Output to html file -


have looked on web fail. running python script want output data html file in table format. how can done since getting cgi , have no idea about!

an html file normal file.

with open("/tmp/myfile.html", "w") my_file:   my_file.write("<html><body><table>")   x in range(5):     my_file.write("<tr><td>%d</td></tr>" % x)   my_file.write("</table></body></html>") 

Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -