By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,537 Members | 1,440 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,537 IT Pros & Developers. It's quick & easy.

uTidylib question..

P: n/a
hi...

you can do :

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.

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

thanks

-bruce
Jul 12 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
In <ma***************************************@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
Jul 12 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.