Creating HTML in python,f.write(doc.render())