Michal, I've improved HTML.py thanks to your ideas and code proposal. The Table class in HTML.py 0.04 provides new attributes to set width, alignment and style for each column. The implementation is slightly different from the one you proposed in order to keep it simple and extensible, but it should provide the same results.
Added column styles, width and alignment
Michal, I've improved HTML.py thanks to your ideas and code proposal. The Table class in HTML.py 0.04 provides new attributes to set width, alignment and style for each column. The implementation is slightly different from the one you proposed in order to keep it simple and extensible, but it should provide the same results.
At first I wanted to use the simple <COL> tags according to HTML 4.01 specs, but after some time I realized I was hitting one of the oldest and trickiest bugs in Mozilla and Firefox!: https://bugzilla.mozilla.org/show_bug.cgi?id=915
That's why in the end column width and styles are added to each cell, in order to accomodate with browser bugs...