HTML -> HTMLGen (or similiar)

VanL vlindberg at verio.net
Wed Apr 9 19:18:30 EDT 2003


Hello,

I have a bunch of existing HTML that I need to integrate into a new web 
app.  I would ideally like to use one of the existing HTML generation 
systems (HTMLgen, HyperText, any others) but I don't want to have to 
build up an equivalent representation for the many pages I need to work 
with.

The pages validate as HTML 4.01, so no strange measures are necessary. 
However, does anyone know of a package that can take existing (valid) 
HTML and make it into an object that I can manipulate?

What I have in mind is something similar to the python 2.2+ email module:

import email
msg = email.message_from_string(email_message)
[modify here]
print str(message)  [Serialize out to text]


instead, an html module:

import html
page = html.page_from_string(html_page)
[modify here]
print str(page)


Thanks,

VanL





More information about the Python-list mailing list