Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ver newbie question html tags to python

Status
Not open for further replies.

dougsworth

Technical User
Apr 5, 2002
4
GB
Hi

i've got a python program, which i didn't write myself, up and running perfectly well.

I've been asked to alter the look of the final product and given the html to do so. Having trouble finding how to fit this into python.

I've had a look at some of the newbie guides but these seem a bit high level...

eg

part of python code:

legend = _("%(hostname)s Group")
doc.SetTitle(legend)
table = Table(border=0, width="100%")
table.AddRow([Center(Header(2, legend))])
table.AddCellInfo(table.GetCurrentRowIndex(), 0, colspan=2,
bgcolor=cfg.WEB_HEADER_COLOR)

I can see that this will produce a table centered with font size 2 with the text in legend in a row in the table with background colour defined.

How would i add an image into the table; add alt tags to the image; specify width/height of image

[or what are the uquivelants to img src; alt etc in html in python?

Any help or pointers to basic guides welcomed

Thanks

Jason
 
I don't believe you're using Python builtins or a standard python module. If you want to know how to use a 3rd party module for generating html, you'll have to refer to the documentation for that module.

It looks like you might be using the Mailman.htmlformat module. That's common, but a not standard Python module.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top