I have a cherrypy web server that uses larges amounts of HTML data. Is there anyway in Python to minimize the HTML so that all comments, spaces, ext, are removed?
A:
HTML Tidy's libtidy doesn't seem to have python bindings (bit it does have perl and c++ etc), but ought to be easy to run as an exe in a pipe.
Or ideally, use it to 'tidy' all static html files once so they don't need to be tidied each time they are served.
Will
2009-09-17 08:05:08
That page links to a *TidyLib Python wrapper*: http://utidylib.berlios.de/ but I don't know if it minifies.
Andrea Ambu
2009-09-17 08:22:32
+2
A:
there are bindings to tidy for python, called mxTidy from eGenix (Marc André Lemburg)
ghum
2009-10-07 13:35:25