[Tutor] HTML/text formatting question

Alan G alan.gauld at freenet.co.uk
Wed Aug 3 20:11:15 CEST 2005

> if html:
>    print '<html><body bgcolor="FFFFCC">'
>    print '<table border="1" bgcolor="CCCCFF" width="800">'
>    print '<tr><td colspan="2"><h2>'

You can use a single print with a triple quoted string to simplify a 

> I was wondering if there was a better way to do this with a standard 
> Python library.

I donlt think there is one in the standard library but there
is an HTML generator module (HTMLgen) in the Vaults of Parnassus.
It acts a bit like the CGI module in Perl if you are familiar with 

There s a tutorial here:



Alan G.

More information about the Tutor mailing list