HTML Writer in Python