I've retested it to be sure it is still ok in Python3 and I've to modify, to convert str into bytes

self.wfile.write(html)

into

self.wfile.write(html.encode())