uTidylib question..

Marc 'BlackJack' Rintsch bj_666 at gmx.net
Wed Jul 12 02:27:29 EDT 2006


In <mailman.8050.1152664200.27775.python-list at python.org>, bruce wrote:

> import tidy
> s = tidy.parseString(foo)
> 
> which runs the information in "foo" through tidy, for cleaning. this results
> in "s" being a "document object"
> 
> print "s" will display the contents of the object.

If this means it prints out what you want as a string…

> my question, can the "document object" be turned/translated into a string
> var?

…then yes: ``str(s)``

Ciao,
	Marc 'BlackJack' Rintsch



More information about the Python-list mailing list